mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
Merge branch '250220-pre-126-177-gx' into test20250220
# Conflicts: # src/components/VideoPlayer/index.vue
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
@keydown.right.prevent="forwardCurrentTime"
|
@keydown.right.prevent="forwardCurrentTime"
|
||||||
@keydown.up.prevent="increaseVolume"
|
@keydown.up.prevent="increaseVolume"
|
||||||
@keydown.down.prevent="lowerVolume"
|
@keydown.down.prevent="lowerVolume"
|
||||||
@keydown.esc.prevent="toggleFullScreen"
|
@keydown.27.prevent="toggleFullScreen"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
width="100%"
|
width="100%"
|
||||||
height="100%"
|
height="100%"
|
||||||
@@ -384,26 +384,26 @@ 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("F", () => {
|
window.addEventListener("F", () => {
|
||||||
this.isFullscreen = this.isFullScreen();
|
this.isFullscreen = this.isFullScreen();
|
||||||
});
|
});
|
||||||
this.videoDom.addEventListener("keydown", (e) => {
|
|
||||||
console.log("是否监听到");
|
// this.videoDom.addEventListener('keydown', function(e){
|
||||||
if(e.keyCode == 27){
|
// //console.log('\x1b[31m%s\x1b[0m','*****************加载失败**********')
|
||||||
console.log("是否监听到 esc");
|
// console.log("video is exit");
|
||||||
this.toggleFullScreen();
|
// if(e.key === "Escape"){
|
||||||
}
|
// console.log("按键 退出全屏 执行")
|
||||||
});
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
// this.videoDom.addEventListener("keydown", (e) => {
|
||||||
|
// console.log("是否监听到");
|
||||||
|
// if(e.keyCode == 27){
|
||||||
|
// console.log("是否监听到 esc");
|
||||||
|
// this.toggleFullScreen();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//当视频由于需要缓冲下一帧而停止,解决一直计时的问题
|
//当视频由于需要缓冲下一帧而停止,解决一直计时的问题
|
||||||
@@ -425,7 +425,6 @@ export default {
|
|||||||
/* 切换播放状态
|
/* 切换播放状态
|
||||||
*/
|
*/
|
||||||
togglePlayStatus() {
|
togglePlayStatus() {
|
||||||
console.log("togglePlayStatus is this.videoDom.paused ",this.videoDom.paused)
|
|
||||||
if (this.videoDom.paused) {
|
if (this.videoDom.paused) {
|
||||||
if(!this.isInit && this.initTime != null && this.initTime > 0){
|
if(!this.isInit && this.initTime != null && this.initTime > 0){
|
||||||
this.videoDom.currentTime = this.initTime;
|
this.videoDom.currentTime = this.initTime;
|
||||||
|
|||||||
Reference in New Issue
Block a user