Commit 7c2d7033 authored by Quxl's avatar Quxl

x

parent d30d0a15
...@@ -89,38 +89,40 @@ body { ...@@ -89,38 +89,40 @@ body {
encryptType: 1, encryptType: 1,
vid : vid, vid : vid,
playauth : playAuth playauth : playAuth
}, function(player) { }, function(xplayer) {
console.log("播放器创建好了。") console.log("播放器创建好了。")
}); document.οnkeydοwn=function(e){
var keyNum=window.event ? e.keyCode :e.which;
document.οnkeydοwn=function(e){ if(keyNum=='32'){
var keyNum=window.event ? e.keyCode :e.which; var status = xplayer.getStatus();
if(keyNum=='32'){ if(status == 'play') {
var status = xplayer.getStatus(); xplayer.pause();
if(status == 'play') { } else {
xplayer.pause(); xplayer.play();
} else { }
xplayer.play(); } else if(keyNum=='37'){//快进
} var videotimes = xplayer.getDuration();
} else if(keyNum=='37'){//快进 var playnum = xplayer.getCurrentTime();
var videotimes = xplayer.getDuration(); playnum =parseInt(playnum-10);
var playnum = xplayer.getCurrentTime(); if(playnum<=(videotimes-30)){
playnum =parseInt(playnum-10); xplayer.seek(playnum);
if(playnum<=(videotimes-30)){ }
xplayer.seek(playnum); } else if(keyNum=='39'){
var videotimes = xplayer.getDuration();
var playnum = xplayer.getCurrentTime();
playnum = parseInt(playnum +10);
if(playnum>15){
xplayer.seek(playnum);
} else{
xplayer.seek(0);
}
} }
} else if(keyNum=='39'){ e.preventDefault();
var videotimes = xplayer.getDuration(); }
var playnum = xplayer.getCurrentTime();
playnum = parseInt(playnum +10);
if(playnum>15){
xplayer.seek(playnum); });
} else{
xplayer.seek(0);
}
}
e.preventDefault();
}
} else if(authJsonObject.code == 300) { } else if(authJsonObject.code == 300) {
scope.toLogin(); scope.toLogin();
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment