mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
退出全屏 esc 触发监听2
This commit is contained in:
@@ -384,6 +384,15 @@ export default {
|
|||||||
this.videoDom.addEventListener('error', function(){
|
this.videoDom.addEventListener('error', function(){
|
||||||
console.log('\x1b[31m%s\x1b[0m','*****************加载失败**********')
|
console.log('\x1b[31m%s\x1b[0m','*****************加载失败**********')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.videoDom.addEventListener('keydown', function(e){
|
||||||
|
//console.log('\x1b[31m%s\x1b[0m','*****************加载失败**********')
|
||||||
|
console.log("video is exit");
|
||||||
|
if(e.key === "Escape"){
|
||||||
|
console.log("按键 退出全屏 执行")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// 监听全屏事件的变化,保存数据
|
// 监听全屏事件的变化,保存数据
|
||||||
window.addEventListener("fullscreenchange", () => {
|
window.addEventListener("fullscreenchange", () => {
|
||||||
this.isFullscreen = this.isFullScreen();
|
this.isFullscreen = this.isFullScreen();
|
||||||
|
|||||||
Reference in New Issue
Block a user