<script setup lang="ts">
import OurPlayer from "@/components/VideoPlayer/OurPlayer.vue";
import {reactive, ref} from "vue";

defineOptions({
  name: "400"
});

const dplayerObj = reactive(
  {
    video: {
      url: "http://192.168.10.28:8000/media/videos/shoving.mp4"
    }
  }
)

const Isvisible = ref(false)

function playVideo() {
  Isvisible.value = true
  const highlights = [
    // 进度条时间点高亮
    {
      text: "aaaa",
      time: 10
    }
  ];
  sessionStorage.setItem("video_url", "http://192.168.10.28:8000/media/videos/shoving.mp4");
  sessionStorage.setItem("highlights", JSON.stringify(highlights));
}

</script>

<template>
  <div class="flex justify-center items-center h-[640px]">

    <el-button text @click="playVideo" type="primary">
            播放视频
    </el-button>

    <el-dialog

            width="50%"
          v-model="Isvisible"
          >
<!--            <div id="dplayer" ></div>-->
            <our-player></our-player>
    </el-dialog>



  </div>
</template>
