Commit 7c2d7033 authored by Quxl's avatar Quxl

x

parent d30d0a15
......@@ -89,38 +89,40 @@ body {
encryptType: 1,
vid : vid,
playauth : playAuth
}, function(player) {
}, function(xplayer) {
console.log("播放器创建好了。")
});
document.οnkeydοwn=function(e){
var keyNum=window.event ? e.keyCode :e.which;
if(keyNum=='32'){
var status = xplayer.getStatus();
if(status == 'play') {
xplayer.pause();
} else {
xplayer.play();
}
} else if(keyNum=='37'){//快进
var videotimes = xplayer.getDuration();
var playnum = xplayer.getCurrentTime();
playnum =parseInt(playnum-10);
if(playnum<=(videotimes-30)){
xplayer.seek(playnum);
document.οnkeydοwn=function(e){
var keyNum=window.event ? e.keyCode :e.which;
if(keyNum=='32'){
var status = xplayer.getStatus();
if(status == 'play') {
xplayer.pause();
} else {
xplayer.play();
}
} else if(keyNum=='37'){//快进
var videotimes = xplayer.getDuration();
var playnum = xplayer.getCurrentTime();
playnum =parseInt(playnum-10);
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'){
var videotimes = xplayer.getDuration();
var playnum = xplayer.getCurrentTime();
playnum = parseInt(playnum +10);
if(playnum>15){
xplayer.seek(playnum);
} else{
xplayer.seek(0);
}
}
e.preventDefault();
}
e.preventDefault();
}
});
} else if(authJsonObject.code == 300) {
scope.toLogin();
} 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