默认是20秒,那怎么按照自定义的配置呢?
打开文件:“.\ckplayer\js\ckplayer.js”
然后在下面的函数中修改就可以了:
下面的代码我已经修改为了按一次方向左键为快退3秒,按一次方向右键为快进5秒。
/** fastBack* 功能:快退* @num为数字时快退指定秒数,为空时快退20秒*/fastBack:function(num){if(duration==0) return;if(isUndefined(num) || valType(num)!='number'){num=3;}var time=player.time();if(time-num>0){time-=num;}else{time=0;}player.seek(time);return player;},/** fastNext* 功能:快进* @num为数字时快进指定秒数,为空时快进20秒*/fastNext:function(num){if(duration==0) return;if(isUndefined(num) || valType(num)!='number'){num=5;}var time=player.time();if(time+num<duration){time+=num;}else{time=duration;}player.seek(time);return player;},
截图如下: