<script setup lang="ts">
const instance = getCurrentInstance()
const props = withDefaults(defineProps<{ src: string; enableProgressGesture: boolean }>(), {
  enableProgressGesture: false,
})
const videoRef = ref()
const videoContext = ref<UniNamespace.VideoContext>()
onMounted(() => {
  videoContext.value = uni.createVideoContext('video', instance)
})
defineExpose({
  videoContext,
})
</script>

<template>
  <video
    class="w-full h-full"
    id="video"
    :src="src"
    :enable-progress-gesture="enableProgressGesture"
  ></video>
</template>

<style scoped lang="scss"></style>
