<video
height="150px"
width="100%"
controls
:src="src"
v-on:fullscreenchange="onFullscreenChange"
v-on:webkitfullscreenchange="onFullscreenChange"
></video>
<script setup>
const onFullscreenChange = () => {
if (document.fullscreenElement || document.webkitFullscreenElement) {
// 全屏状态
console('video全屏时触发')
} else {
console('video还原时触发')
}
};
</script>
video的全屏事件
于 2023-09-15 10:33:39 首次发布