<script setup>
import {reactive, ref} from "vue";

const data = reactive({
    videoSrc: "http://127.0.0.1:32323/s/file/?path=E:/Repository/skcks.cn/sk-box/build/bin/video.mp4",
})

const videoInst = ref();

function loadVideo() {
    if(!videoInst.value){
        return
    }

    videoInst.value.src = data.videoSrc
}
</script>

<template>
    <div>测试页面</div>

    <video ref="videoInst" preload="metadata" controls class="full-width"></video>
    <div id="input" class="input-box">
        <input id="name" v-model="data.videoSrc" autocomplete="off" class="input w-full" type="text"/>
        <button class="btn" @click="loadVideo">加载</button>
    </div>
</template>

<style scoped>

</style>
