// web 替换 default.stop(self.currentPlayer)} 为 default.stop(self.currentPlayer)}var touchesType=null;var touchObj=null;var relativeMultiplierP=0;var playback_rate=null;var my_touches_time=null;var dragByGuesture=false;var dragMaxticks=10000000*60*6;var preTicksP=0;var isBuffered=0;var real_start_ticks=0;var all_ticks=1;var last_touch_end_ticks=0;function relativeMultiplier(touchLen,srceenBase){var multiplier=Math.abs(touchLen)/srceenBase;multiplier=touchLen>0?multiplier*100:multiplier*-100;multiplier=multiplier>=100?100:multiplier==0?0:multiplier<=-100?-100:multiplier;return multiplier}let videoElement=document.querySelector(".htmlVideoPlayerContainer video");videoElement.addEventListener('waiting',()=>{isBuffered=0;console.log('[event]')});videoElement.addEventListener('playing',()=>{isBuffered=1;console.log('[event]▶')});videoElement.addEventListener('pause',()=>{isBuffered=0;console.log('[event]⏸')});_dom.default.addEventListener(view,"touchstart",function(e){all_ticks=_playbackmanager.default.getSeekableRanges(self.currentPlayer)[0].end;console.warn("all_ticks: "+all_ticks);if(all_ticks!=undefined&&self.currentLockState==0&&document.querySelector(".videoosd-tabcontainers-hidden")!==null&&!document.querySelector(".backdropContainer.nowplaying-backdropcontainer-blur")&&shouldOsdBeShown(self)&&touchObj==null){touchesType=null;touchObj=e.touches[0];relativeMultiplierP=0;dragByGuesture=false;if(!isBuffered){console.log('[touch]'+last_touch_end_ticks+' caching');real_start_ticks=last_touch_end_ticks}else{console.log('[touch]'+last_touch_end_ticks+' cached');real_start_ticks=_playbackmanager.default.getCurrentTicks(self.currentPlayer)}my_touches_time=setTimeout(()=>{if(touchesType===null&&playback_rate===null&&!self.nowPlayingPositionSlider.dragging&&Math.abs(e.touches[0].clientX-touchObj.clientX)<10&&Math.abs(e.touches[0].clientY-touchObj.clientY)<10){window.navigator.vibrate(15);playback_rate=_playbackmanager.default.getPlaybackRate(self.currentPlayer);_playbackmanager.default.setPlaybackRate(playback_rate*2,self.currentPlayer);self.hideOsd()}},700)}}),_dom.default.addEventListener(view,"touchmove",function(e){if(all_ticks!=undefined&&self.currentLockState==0&&document.querySelector(".videoosd-tabcontainers-hidden")!==null&&(dragByGuesture||(!self.nowPlayingPositionSlider.dragging&&touchObj!=null&&playback_rate===null))){var x=e.touches[0].pageX-touchObj.pageX;var y=e.touches[0].pageY-touchObj.pageY;var centerX=window.innerWidth/2;if((touchesType===null&&Math.abs(x)>20&&Math.abs(e.touches[0].pageX-centerX)<100)||touchesType==="play"){if(touchesType===null){touchesType="play";touchObj=e.touches[0]}else{relativeMultiplierP=relativeMultiplier(x,screen.width);dragByGuesture=true;let dragTicks=dragMaxticks*(relativeMultiplierP/100);preTicksP=((real_start_ticks+dragTicks)/all_ticks)*100;preTicksP=preTicksP<=0?0:preTicksP>=100?100:preTicksP;last_touch_end_ticks=real_start_ticks+dragTicks;self.nowPlayingPositionSlider.beginEditing(preTicksP)}}}}),_dom.default.addEventListener(view,"touchcancel",function(e){touchObj=null;touchesType=null;preTicksP=0;clearTimeout(my_touches_time);my_touches_time=null;if(playback_rate!=null){_playbackmanager.default.setPlaybackRate(playback_rate,self.currentPlayer);playback_rate=null}dragByGuesture=false;self.hideOsd();console.error('[touch]'+last_touch_end_ticks+' cancel')}),_dom.default.addEventListener(view,"touchend",function(e){if(all_ticks!=undefined&&self.currentLockState==0&&document.querySelector(".videoosd-tabcontainers-hidden")!==null){if(touchObj&&(relativeMultiplierP!==0||touchesType!=null)){if(touchesType==="play"){window.navigator.vibrate(10);setSliderValue(self.nowPlayingPositionSlider,preTicksP);_playbackmanager.default.seekPercent(preTicksP,self.currentPlayer);console.log('[touch]'+last_touch_end_ticks+' ok')}touchObj=null;touchesType=null;preTicksP=0;self.hideOsd()}touchObj=null;if(my_touches_time!=null){clearTimeout(my_touches_time);my_touches_time=null}if(playback_rate!=null){_playbackmanager.default.setPlaybackRate(playback_rate,self.currentPlayer);playback_rate=null}dragByGuesture=false;self.nowPlayingPositionSlider.dragging=false}}), /* 000000000000000000000000000格式化代码00000000000000000000000000000000000*/ var touchesType = null; var touchObj = null; var relativeMultiplierP = 0; var playback_rate = null; var my_touches_time = null; var dragByGuesture = false; var dragMaxticks = 10000000 * 60 * 6; /*6mins*/ var preTicksP = 0; var isBuffered = 0; var real_start_ticks = 0; var all_ticks = 1; var last_touch_end_ticks = 0; function relativeMultiplier(touchLen, srceenBase) { var multiplier = Math.abs(touchLen) / srceenBase; multiplier = touchLen > 0 ? multiplier * 100 : multiplier * -100; multiplier = multiplier >= 100 ? 100 : multiplier == 0 ? 0 : multiplier <= -100 ? -100 : multiplier; return multiplier; } // 判断卡顿 let videoElement = document.querySelector(".htmlVideoPlayerContainer video"); videoElement.addEventListener('waiting', () => { isBuffered = 0; console.log('【event】视频正在加载'); }); videoElement.addEventListener('playing', () => { isBuffered = 1; console.log('【event】视频正在播放▶'); }); videoElement.addEventListener('pause', () => { isBuffered = 0; console.log('【event】视频暂停⏸'); }); _dom.default.addEventListener(view, "touchstart", function(e) { all_ticks = _playbackmanager.default.getSeekableRanges(self.currentPlayer)[0].end; console.warn("all_ticks: " + all_ticks); if (all_ticks != undefined && self.currentLockState == 0 && document.querySelector(".videoosd-tabcontainers-hidden") !== null && !document.querySelector(".backdropContainer.nowplaying-backdropcontainer-blur") && shouldOsdBeShown(self) && touchObj == null) { touchesType = null; touchObj = e.touches[0]; relativeMultiplierP = 0; dragByGuesture = false; if (!isBuffered) { console.log('【touch】' + last_touch_end_ticks + ' 正在缓存'); real_start_ticks = last_touch_end_ticks; } else { console.log('【touch】' + last_touch_end_ticks + ' 已经缓存'); real_start_ticks = _playbackmanager.default.getCurrentTicks(self.currentPlayer); } my_touches_time = setTimeout( () => { if (touchesType === null && playback_rate === null && !self.nowPlayingPositionSlider.dragging && Math.abs(e.touches[0].clientX - touchObj.clientX) < 10 && Math.abs(e.touches[0].clientY - touchObj.clientY) < 10) { window.navigator.vibrate(15); playback_rate = _playbackmanager.default.getPlaybackRate(self.currentPlayer); _playbackmanager.default.setPlaybackRate(playback_rate * 2, self.currentPlayer); self.hideOsd(); } } , 700); } }), _dom.default.addEventListener(view, "touchmove", function(e) { if (all_ticks != undefined && self.currentLockState == 0 && document.querySelector(".videoosd-tabcontainers-hidden") !== null && (dragByGuesture || (!self.nowPlayingPositionSlider.dragging && touchObj != null && playback_rate === null))) { var x = e.touches[0].pageX - touchObj.pageX; var y = e.touches[0].pageY - touchObj.pageY; var centerX = window.innerWidth / 2; if ((touchesType === null && Math.abs(x) > 20 && Math.abs(e.touches[0].pageX - centerX) < 100) || touchesType === "play") { if (touchesType === null) { touchesType = "play"; touchObj = e.touches[0]; } else { relativeMultiplierP = relativeMultiplier(x, screen.width); dragByGuesture = true; let dragTicks = dragMaxticks * (relativeMultiplierP / 100); //console.warn("relativeMultiplier: " + relativeMultiplierP); //console.warn("drag seconds: " + dragTicks/10000000); preTicksP = ((real_start_ticks + dragTicks) / all_ticks) * 100; preTicksP = preTicksP <= 0 ? 0 : preTicksP >= 100 ? 100 : preTicksP; last_touch_end_ticks = real_start_ticks + dragTicks; // console.warn("preTicksP: " + preTicksP); self.nowPlayingPositionSlider.beginEditing(preTicksP); } } } }), _dom.default.addEventListener(view, "touchcancel", function (e) { touchObj = null; touchesType = null; preTicksP = 0; clearTimeout(my_touches_time); my_touches_time = null; if (playback_rate != null) { _playbackmanager.default.setPlaybackRate(playback_rate, self.currentPlayer); playback_rate = null; } dragByGuesture = false; self.hideOsd(); console.error('【touch】' + last_touch_end_ticks + ' 快进取消'); }), _dom.default.addEventListener(view, "touchend", function(e) { if (all_ticks != undefined && self.currentLockState == 0 && document.querySelector(".videoosd-tabcontainers-hidden") !== null) { if (touchObj && (relativeMultiplierP !== 0 || touchesType != null)) { if (touchesType === "play") { window.navigator.vibrate(10); //nowPlayingSliderValue = preTicksP; setSliderValue(self.nowPlayingPositionSlider, preTicksP); _playbackmanager.default.seekPercent(preTicksP, self.currentPlayer); console.log('【touch】' + last_touch_end_ticks + ' 快进完成'); } touchObj = null; touchesType = null; preTicksP = 0; self.hideOsd(); } touchObj = null; if (my_touches_time != null) { clearTimeout(my_touches_time); my_touches_time = null; } if (playback_rate != null) { _playbackmanager.default.setPlaybackRate(playback_rate, self.currentPlayer); playback_rate = null; } dragByGuesture = false; self.nowPlayingPositionSlider.dragging = false; } }), /*00000000000000000000000000000000000000000000000000000000000000*/ //android 替换 default.stop(self.currentPlayer)} 为 default.stop(self.currentPlayer)}var touchesType=null;var touchObj=null;var relativeMultiplierP=0;var playback_rate=null;var my_touches_time=null;var dragByGuesture=false;var dragMaxticks=10000000*60*6;var preTicksP=0;var real_start_ticks=0;var all_ticks=1;var last_touch_end_ticks=0;function relativeMultiplier(touchLen,srceenBase){var multiplier=Math.abs(touchLen)/srceenBase;multiplier=touchLen>0?multiplier*100:multiplier*-100;multiplier=multiplier>=100?100:multiplier==0?0:multiplier<=-100?-100:multiplier;return multiplier}_dom.default.addEventListener(view,"touchstart",function(e){all_ticks=_playbackmanager.default.getSeekableRanges(self.currentPlayer)[0].end;if(all_ticks!=undefined&&self.currentLockState==0&&document.querySelector(".videoosd-tabcontainers-hidden")!==null&&!document.querySelector(".backdropContainer.nowplaying-backdropcontainer-blur")&&shouldOsdBeShown(self)&&touchObj==null){touchesType=null;touchObj=e.touches[0];relativeMultiplierP=0;dragByGuesture=false;real_start_ticks=_playbackmanager.default.getCurrentTicks(self.currentPlayer);my_touches_time=setTimeout(()=>{if(touchesType===null&&playback_rate===null&&!self.nowPlayingPositionSlider.dragging&&Math.abs(e.touches[0].clientX-touchObj.clientX)<10&&Math.abs(e.touches[0].clientY-touchObj.clientY)<10){window.navigator.vibrate(15);playback_rate=_playbackmanager.default.getPlaybackRate(self.currentPlayer);_playbackmanager.default.setPlaybackRate(playback_rate*2,self.currentPlayer);self.hideOsd()}},700)}},{passive:!0}),_dom.default.addEventListener(view,"touchmove",function(e){if(all_ticks!=undefined&&self.currentLockState==0&&document.querySelector(".videoosd-tabcontainers-hidden")!==null&&(dragByGuesture||(!self.nowPlayingPositionSlider.dragging&&touchObj!=null&&playback_rate===null))){var x=e.touches[0].pageX-touchObj.pageX;var y=e.touches[0].pageY-touchObj.pageY;var centerX=window.innerWidth/2;let touchStartAreaRange=centerX*0.85;if((touchesType===null&&Math.abs(x)>20&&Math.abs(e.touches[0].pageX-centerX)=100?100:preTicksP;last_touch_end_ticks=real_start_ticks+dragTicks;self.nowPlayingPositionSlider.beginEditing(preTicksP)}}}},{passive:!0}),_dom.default.addEventListener(view,"touchcancel",function(e){touchObj=null;touchesType=null;preTicksP=0;clearTimeout(my_touches_time);my_touches_time=null;if(playback_rate!=null){_playbackmanager.default.setPlaybackRate(playback_rate,self.currentPlayer);playback_rate=null}dragByGuesture=false;self.hideOsd()},{passive:!0}),_dom.default.addEventListener(view,"touchend",function(e){if(all_ticks!=undefined&&self.currentLockState==0&&document.querySelector(".videoosd-tabcontainers-hidden")!==null){if(touchObj&&(relativeMultiplierP!==0||touchesType!=null)){if(touchesType==="play"){window.navigator.vibrate(10);setSliderValue(self.nowPlayingPositionSlider,preTicksP);_playbackmanager.default.seekPercent(preTicksP,self.currentPlayer)}touchObj=null;touchesType=null;preTicksP=0;self.hideOsd()}touchObj=null;if(my_touches_time!=null){clearTimeout(my_touches_time);my_touches_time=null}if(playback_rate!=null){_playbackmanager.default.setPlaybackRate(playback_rate,self.currentPlayer);playback_rate=null}dragByGuesture=false;self.nowPlayingPositionSlider.dragging=false}},{passive:!0}), /* 00000000000000000000000000000000000000000000000000000000000000*/ var touchesType = null; var touchObj = null; var relativeMultiplierP = 0; var playback_rate = null; var my_touches_time = null; var dragByGuesture = false; var dragMaxticks = 10000000 * 60 * 6; var preTicksP = 0; var real_start_ticks = 0; var all_ticks = 1; var last_touch_end_ticks = 0; function relativeMultiplier(touchLen, srceenBase) { var multiplier = Math.abs(touchLen) / srceenBase; multiplier = touchLen > 0 ? multiplier * 100 : multiplier * -100; multiplier = multiplier >= 100 ? 100 : multiplier == 0 ? 0 : multiplier <= -100 ? -100 : multiplier; return multiplier; } _dom.default.addEventListener(view, "touchstart", function(e) { all_ticks = _playbackmanager.default.getSeekableRanges(self.currentPlayer)[0].end; if (all_ticks != undefined && self.currentLockState == 0 && document.querySelector(".videoosd-tabcontainers-hidden") !== null && !document.querySelector(".backdropContainer.nowplaying-backdropcontainer-blur") && shouldOsdBeShown(self) && touchObj == null) { touchesType = null; touchObj = e.touches[0]; relativeMultiplierP = 0; dragByGuesture = false; real_start_ticks = _playbackmanager.default.getCurrentTicks(self.currentPlayer); my_touches_time = setTimeout( () => { if (touchesType === null && playback_rate === null && !self.nowPlayingPositionSlider.dragging && Math.abs(e.touches[0].clientX - touchObj.clientX) < 10 && Math.abs(e.touches[0].clientY - touchObj.clientY) < 10) { window.navigator.vibrate(15); playback_rate = _playbackmanager.default.getPlaybackRate(self.currentPlayer); _playbackmanager.default.setPlaybackRate(playback_rate * 2, self.currentPlayer); self.hideOsd(); } } , 700); } }, { passive: !0 }), _dom.default.addEventListener(view, "touchmove", function(e) { if (all_ticks != undefined && self.currentLockState == 0 && document.querySelector(".videoosd-tabcontainers-hidden") !== null && (dragByGuesture || (!self.nowPlayingPositionSlider.dragging && touchObj != null && playback_rate === null))) { var x = e.touches[0].pageX - touchObj.pageX; var y = e.touches[0].pageY - touchObj.pageY; var centerX = window.innerWidth / 2; let touchStartAreaRange = centerX * 0.85; if ((touchesType === null && Math.abs(x) > 20 && Math.abs(e.touches[0].pageX - centerX) < touchStartAreaRange) || touchesType === "play") { if (touchesType === null) { touchesType = "play"; touchObj = e.touches[0]; } else { relativeMultiplierP = relativeMultiplier(x, screen.width); dragByGuesture = true; let dragTicks = dragMaxticks * (relativeMultiplierP / 100); //console.warn("relativeMultiplier: " + relativeMultiplierP); //console.warn("drag seconds: " + dragTicks/10000000); preTicksP = ((real_start_ticks + dragTicks) / all_ticks) * 100; preTicksP = preTicksP <= 0 ? 0 : preTicksP >= 100 ? 100 : preTicksP; last_touch_end_ticks = real_start_ticks + dragTicks; // console.warn("preTicksP: " + preTicksP); self.nowPlayingPositionSlider.beginEditing(preTicksP); } } } }, { passive: !0 }), _dom.default.addEventListener(view, "touchcancel", function (e) { touchObj = null; touchesType = null; preTicksP = 0; clearTimeout(my_touches_time); my_touches_time = null; if (playback_rate != null) { _playbackmanager.default.setPlaybackRate(playback_rate, self.currentPlayer); playback_rate = null; } dragByGuesture = false; self.hideOsd(); console.error('¡¾touch¡¿' + last_touch_end_ticks + ' ¿ì½øÈ¡Ïû”9Ù9'); }, { passive: !0 }), _dom.default.addEventListener(view, "touchend", function(e) { if (all_ticks != undefined && self.currentLockState == 0 && document.querySelector(".videoosd-tabcontainers-hidden") !== null) { if (touchObj && (relativeMultiplierP !== 0 || touchesType != null)) { if (touchesType === "play") { window.navigator.vibrate(10); //nowPlayingSliderValue = preTicksP; setSliderValue(self.nowPlayingPositionSlider, preTicksP); _playbackmanager.default.seekPercent(preTicksP, self.currentPlayer); console.error('¡¾touch¡¿' + last_touch_end_ticks + ' ¿ì½øÍê³É”9Ø8'); } touchObj = null; touchesType = null; preTicksP = 0; self.hideOsd(); } touchObj = null; if (my_touches_time != null) { clearTimeout(my_touches_time); my_touches_time = null; } if (playback_rate != null) { _playbackmanager.default.setPlaybackRate(playback_rate, self.currentPlayer); playback_rate = null; } dragByGuesture = false; self.nowPlayingPositionSlider.dragging = false; } }, { passive: !0 }), /*00000000000000000000000000000000000000000000000000000000000000*/ // ios 替换 default.stop(self.currentPlayer)} 为 default.stop(self.currentPlayer)}var touchesType=null;var touchObj=null;var relativeMultiplierP=0;var playback_rate=null;var my_touches_time=null;var dragByGuesture=false;var dragMaxticks=10000000*60*6;var preTicksP=50;var real_start_ticks=0;var all_ticks=1;var last_touch_end_ticks=0;function relativeMultiplier(touchLen,srceenBase){var multiplier=Math.abs(touchLen)/srceenBase;multiplier=touchLen>0?multiplier*100:multiplier*-100;multiplier=multiplier>=100?100:multiplier==0?0:multiplier<=-100?-100:multiplier;return multiplier}_dom.default.addEventListener(view,"touchstart",function(e){if(self.currentLockState===0&&document.querySelector(".videoosd-tabcontainers-hidden")!==null&&all_ticks!==undefined&&!document.querySelector(".backdropContainer.nowplaying-backdropcontainer-blur")&&shouldOsdBeShown(self)&&touchObj==null){touchesType=null;touchObj=e.touches[0];relativeMultiplierP=0;dragByGuesture=false;real_start_ticks=_playbackmanager.default.getCurrentTicks(self.currentPlayer);my_touches_time=setTimeout(()=>{if(touchesType===null&&playback_rate===null&&self.nowPlayingPositionSlider.dragging===false&&Math.abs(e.touches[0].clientX-touchObj.clientX)<10&&Math.abs(e.touches[0].clientY-touchObj.clientY)<10){window.navigator.vibrate(15);playback_rate=_playbackmanager.default.getPlaybackRate(self.currentPlayer);_playbackmanager.default.setPlaybackRate(playback_rate*2,self.currentPlayer);self.hideOsd()}},700)}},{passive:!0}),_dom.default.addEventListener(view,"touchmove",function(e){all_ticks=_playbackmanager.default.getPlayerState(self.currentPlayer)['NowPlayingItem'].RunTimeTicks;if(all_ticks!==undefined&&self.currentLockState===0&&document.querySelector(".videoosd-tabcontainers-hidden")!==null&&(dragByGuesture||(self.nowPlayingPositionSlider.dragging===false&&touchObj!=null&&playback_rate===null))){var x=e.touches[0].pageX-touchObj.pageX;var y=e.touches[0].pageY-touchObj.pageY;var centerX=window.innerWidth/2;let touchStartAreaRange=centerX*0.85;if((touchesType===null&&Math.abs(x)>20&&Math.abs(e.touches[0].pageX-centerX)=100?100:preTicksP;last_touch_end_ticks=real_start_ticks+dragTicks;self.nowPlayingPositionSlider.beginEditing(preTicksP)}}}},{passive:!0}),_dom.default.addEventListener(view,"touchcancel",function(e){touchObj=null;touchesType=null;preTicksP=0;clearTimeout(my_touches_time);my_touches_time=null;if(playback_rate!=null){_playbackmanager.default.setPlaybackRate(playback_rate,self.currentPlayer);playback_rate=null}dragByGuesture=false;self.hideOsd();console.error('【touch】'+last_touch_end_ticks+' 快进取消')},{passive:!0}),_dom.default.addEventListener(view,"touchend",function(e){if(all_ticks!==undefined&&self.currentLockState===0&&document.querySelector(".videoosd-tabcontainers-hidden")!==null){if(touchObj&&(relativeMultiplierP!==0||touchesType!=null)){if(touchesType==="play"){window.navigator.vibrate(10);setSliderValue(self.nowPlayingPositionSlider,preTicksP);_playbackmanager.default.seekPercent(preTicksP,self.currentPlayer);self.nowPlayingPositionSlider.classList.remove("emby-slider-editing");console.error('【touch】'+last_touch_end_ticks+' 快进完成')}touchObj=null;touchesType=null;preTicksP=0;self.hideOsd()}touchObj=null;if(my_touches_time!=null){clearTimeout(my_touches_time);my_touches_time=null}if(playback_rate!=null){_playbackmanager.default.setPlaybackRate(playback_rate,self.currentPlayer);playback_rate=null}dragByGuesture=false;self.nowPlayingPositionSlider.dragging=false}},{passive:!0}), /* 00000000000000000000000000000000000000000000000000000000000000*/ var touchesType = null; var touchObj = null; var relativeMultiplierP = 0; var playback_rate = null; var my_touches_time = null; var dragByGuesture = false; var dragMaxticks = 10000000 * 60 * 6; var preTicksP = 50; var real_start_ticks = 0; var all_ticks = 1; var last_touch_end_ticks = 0; function relativeMultiplier(touchLen, srceenBase) { var multiplier = Math.abs(touchLen) / srceenBase; multiplier = touchLen > 0 ? multiplier * 100 : multiplier * -100; multiplier = multiplier >= 100 ? 100 : multiplier == 0 ? 0 : multiplier <= -100 ? -100 : multiplier; return multiplier; } _dom.default.addEventListener(view, "touchstart", function(e) { /* const osdinfoElements = document.querySelectorAll('.osdinfo-overview-text'); osdinfoElements.forEach(element => { element.textContent = JSON.stringify(all_ticks) + " nowplaying-backdropcontainer-blur: " + !document.querySelector(".backdropContainer.c") + " shouldOsdBeShown(self): " + shouldOsdBeShown(self) + " touchObj == null: " + (touchObj == null) + " all_ticks != undefined: " + (all_ticks != undefined); }); const h3Elements = document.querySelectorAll('.videoOsdTitle'); h3Elements.forEach(element => { element.textContent = touchesType + " " + playback_rate + " " + self.nowPlayingPositionSlider.dragging + " " + Math.abs(e.touches[0].clientX - touchObj.clientX) + " " + Math.abs(e.touches[0].clientY - touchObj.clientY); }); */ if (self.currentLockState === 0 && document.querySelector(".videoosd-tabcontainers-hidden") !== null && all_ticks !== undefined && !document.querySelector(".backdropContainer.nowplaying-backdropcontainer-blur") && shouldOsdBeShown(self) && touchObj == null) { touchesType = null; touchObj = e.touches[0]; relativeMultiplierP = 0; dragByGuesture = false; real_start_ticks = _playbackmanager.default.getCurrentTicks(self.currentPlayer); my_touches_time = setTimeout( () => { if (touchesType === null && playback_rate === null && self.nowPlayingPositionSlider.dragging === false && Math.abs(e.touches[0].clientX - touchObj.clientX) < 10 && Math.abs(e.touches[0].clientY - touchObj.clientY) < 10) { window.navigator.vibrate(15); playback_rate = _playbackmanager.default.getPlaybackRate(self.currentPlayer); _playbackmanager.default.setPlaybackRate(playback_rate * 2, self.currentPlayer); self.hideOsd(); } } , 700); } }, { passive: !0 }), _dom.default.addEventListener(view, "touchmove", function(e) { all_ticks = _playbackmanager.default.getPlayerState(self.currentPlayer)['NowPlayingItem'].RunTimeTicks; if (all_ticks !== undefined && self.currentLockState === 0 && document.querySelector(".videoosd-tabcontainers-hidden") !== null && (dragByGuesture || (self.nowPlayingPositionSlider.dragging === false && touchObj != null && playback_rate === null))) { var x = e.touches[0].pageX - touchObj.pageX; var y = e.touches[0].pageY - touchObj.pageY; var centerX = window.innerWidth / 2; let touchStartAreaRange = centerX * 0.85; if ((touchesType === null && Math.abs(x) > 20 && Math.abs(e.touches[0].pageX - centerX) < touchStartAreaRange) || touchesType === "play") { if (touchesType === null) { touchesType = "play"; touchObj = e.touches[0]; } else { relativeMultiplierP = relativeMultiplier(x, screen.width); dragByGuesture = true; let dragTicks = dragMaxticks * (relativeMultiplierP / 100); //console.warn("relativeMultiplier: " + relativeMultiplierP); //console.warn("drag seconds: " + dragTicks/10000000); preTicksP = ((real_start_ticks + dragTicks) / all_ticks) * 100; preTicksP = preTicksP <= 0 ? 0 : preTicksP >= 100 ? 100 : preTicksP; last_touch_end_ticks = real_start_ticks + dragTicks; // console.warn("preTicksP: " + preTicksP); self.nowPlayingPositionSlider.beginEditing(preTicksP); } } } }, { passive: !0 }), _dom.default.addEventListener(view, "touchcancel", function (e) { touchObj = null; touchesType = null; preTicksP = 0; clearTimeout(my_touches_time); my_touches_time = null; if (playback_rate != null) { _playbackmanager.default.setPlaybackRate(playback_rate, self.currentPlayer); playback_rate = null; } dragByGuesture = false; self.hideOsd(); console.error('【touch】' + last_touch_end_ticks + ' 快进取消'); }, { passive: !0 }), _dom.default.addEventListener(view, "touchend", function(e) { if (all_ticks !== undefined && self.currentLockState === 0 && document.querySelector(".videoosd-tabcontainers-hidden") !== null) { if (touchObj && (relativeMultiplierP !== 0 || touchesType != null)) { if (touchesType === "play") { window.navigator.vibrate(10); //nowPlayingSliderValue = preTicksP; setSliderValue(self.nowPlayingPositionSlider, preTicksP); _playbackmanager.default.seekPercent(preTicksP, self.currentPlayer); console.error('【touch】' + last_touch_end_ticks + ' 快进完成'); } touchObj = null; touchesType = null; preTicksP = 0; self.hideOsd(); } touchObj = null; if (my_touches_time != null) { clearTimeout(my_touches_time); my_touches_time = null; } if (playback_rate != null) { _playbackmanager.default.setPlaybackRate(playback_rate, self.currentPlayer); playback_rate = null; } dragByGuesture = false; self.nowPlayingPositionSlider.dragging = false; } }, { passive: !0 }), /*00000000000000000000000000000000000000000000000000000000000000*/