[html] HTML5如何监听video的全屏和退出全屏?
生活随笔
收集整理的這篇文章主要介紹了
[html] HTML5如何监听video的全屏和退出全屏?
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
[html] HTML5如何監聽video的全屏和退出全屏?
監聽fullscreenchange事件document.addEventListener('fullscreenchange', (event) => {// document.fullscreenElement will point to the element that// is in fullscreen mode if there is one. If there isn't one,// the value of the property is null.if (document.fullscreenElement) {console.log(`Element: ${document.fullscreenElement.id} entered full-screen mode.`);} else {console.log('Leaving full-screen mode.');} });個人簡介
我是歌謠,歡迎和大家一起交流前后端知識。放棄很容易,
但堅持一定很酷。歡迎大家一起討論
主目錄
與歌謠一起通關前端面試題
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的[html] HTML5如何监听video的全屏和退出全屏?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 排序算法-冒泡排序详细讲解(Bubble
- 下一篇: ui边框设计图_UI设计形状和对象基础知