mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
rebuilding site Sun Sep 27 08:00:01 PM CST 2020
This commit is contained in:
parent
c34b6cfb10
commit
a82669a224
2 changed files with 27 additions and 14 deletions
|
@ -13,7 +13,7 @@ input{height: 40px; width: 100%;background-color:transparent;border-radius: 50px
|
|||
</ul>
|
||||
<hr/>
|
||||
|
||||
<p><a href="i:25524287">切换</a>/<a href="i:260">重置</a>/<a href="i:26524287">反置所有</a>/<a href="i:2631">反置前五个</a>/<a href="i:26511">反置前九个</a>以下功能 (点击链接可切换):</p>
|
||||
<p><a href="i:251048575">切换</a>/<a href="i:260">重置</a>/<a href="i:261048575">反置所有</a>/<a href="i:2631">反置前五个</a>/<a href="i:26511">反置前九个</a>以下功能 (点击链接可切换):</p>
|
||||
<ul>
|
||||
<li>工具按钮短按长按功能互换
|
||||
<ul>
|
||||
|
@ -40,6 +40,7 @@ input{height: 40px; width: 100%;background-color:transparent;border-radius: 50px
|
|||
<li><a href="i:2565536">禁止弹出JS确认框</a></li>
|
||||
<li><a href="i:25131072">保存查询历史</a></li>
|
||||
<li><a href="i:25262144">切换窗口时保留面板</a></li>
|
||||
<li><a href="i:25524288">弹出视频地址时同时弹出iframe地址</a></li>
|
||||
</ul>
|
||||
|
||||
<hr/><br/>
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
(function(){
|
||||
if(window.__videoplayer_enhancer__){
|
||||
window.__videoplayer_enhancer__();
|
||||
throw '';
|
||||
}else{
|
||||
window.__videoplayer_enhancer__ = function(){
|
||||
/* lib begin */
|
||||
function debounce(fn, ms = 0) {
|
||||
let timeoutId;
|
||||
|
@ -296,6 +300,8 @@ const get_video_touch_hook = (video, e) => {
|
|||
start_time = video.currentTime;
|
||||
|
||||
hook_fn.start.forEach(fn => fn(e, start_time));
|
||||
//window.playbackRate = video.playbackRate;
|
||||
//video.playbackRate = 4.0;
|
||||
};
|
||||
if (e) {
|
||||
setTimeout(touch_start, 0, e);
|
||||
|
@ -310,9 +316,15 @@ const get_video_touch_hook = (video, e) => {
|
|||
fullscreen2Element(top_wrap);
|
||||
};
|
||||
|
||||
const touch_end = e => {
|
||||
hook_fn.end.forEach(fn => fn(e));
|
||||
};
|
||||
const touch_end = e => {
|
||||
hook_fn.end.forEach(fn => fn(e));
|
||||
/*
|
||||
video.playbackRate = window.playbackRate;
|
||||
const end_x = e.changedTouches[0].pageX;
|
||||
if(!(end_x - start_x === 0 ))
|
||||
fullscreen2Element(top_wrap);
|
||||
*/
|
||||
};
|
||||
|
||||
top_wrap.addEventListener('touchstart', touch_start, { passive: false });
|
||||
top_wrap.addEventListener('touchmove', touch_move, { passive: false });
|
||||
|
@ -596,8 +608,10 @@ const hook_video_control = hook => {
|
|||
clear_content();
|
||||
|
||||
if(window.playbackRate>=2.0) window.playbackRate=0.5;
|
||||
else if(window.playbackRate<=0.5) window.playbackRate=1.0;
|
||||
else window.playbackRate=2.0;
|
||||
else if(window.playbackRate<1.0) window.playbackRate=1.0;
|
||||
else if(window.playbackRate<1.25) window.playbackRate=1.25;
|
||||
else if(window.playbackRate<1.5) window.playbackRate=1.5;
|
||||
else window.playbackRate = 2.0;
|
||||
|
||||
const split = window.playbackRate.toString().split('.');
|
||||
control.content_divs[0].innerText = split[0];
|
||||
|
@ -615,13 +629,9 @@ const hook_video_control = hook => {
|
|||
e.stopImmediatePropagation();
|
||||
clear_content();
|
||||
|
||||
if(control.div.style.display === 'none')
|
||||
if(control.div.style.display === 'none'||!window.playbackPos)
|
||||
window.playbackPos = video.currentTime;
|
||||
else {
|
||||
if(!window.playbackPos)
|
||||
window.playbackPos = video.currentTime;
|
||||
window.playbackPos += 180;
|
||||
}
|
||||
window.playbackPos += 180;
|
||||
|
||||
const time = sec2HHMMSS(window.playbackPos);
|
||||
const split = time.split(':');
|
||||
|
@ -718,4 +728,6 @@ const hook_video = (video) => {
|
|||
}
|
||||
|
||||
videos.forEach(hook_video);
|
||||
})()
|
||||
};
|
||||
}
|
||||
window.__videoplayer_enhancer__();
|
||||
|
|
Loading…
Reference in a new issue