
<template>
	<div>
		<video ref="rVideoPlayer" class="video-js vjs-default-skin"></video>
	</div>
</template>

<script>

import videoJs from 'video.js'
import { reactive, ref } from "vue";
import { onMounted, onBeforeUnmount } from 'vue'
const props = defineProps({
  options: {
    type: Object,
    default: () => ({}),
  }
})
const { options } = toRefs(props);
watch(options, (newValue) => {
		
	},{
		deep: true
	},
);
const rVideoPlayer = ref("")
let player = ref()
onMounted(() => {
  player.value = videoJs(rVideoPlayer.value, props.options)
})
onBeforeUnmount(() => {
  if (player.value) {
    player.value.dispose()
  }
})

</script>

