观看记录
  • 我的观影记录
登录
  • 正在播放:《豪门天价前妻》第82集 - BDDJ
  • 提醒不要轻易相信视频中的广告,谨防上当受骗!
  • 技巧视频载入速度跟网速有关,请耐心等待几秒钟
  • 收藏Y-cinema网址:Ycinema.cn ,记得收藏哟~

影片评论

切换语言
切换深色外观
留言
回到顶部
// 只要播放器顶部滚出屏幕外就悬浮 function needMini() { if(!$wrap.length) return false; const rect = $wrap[0].getBoundingClientRect(); // rect.top < 0 = 视频上边看不见了,立刻右下角悬浮 return rect.top < -250; } function switchMiniPlayer() { if(needMini()) { $iframe .removeClass('in') .addClass('out') .css({ position: 'fixed', width: '640px', height: '360px', right: '12px', bottom: '12px', left: 'auto', top: 'auto', zIndex: '999999', borderRadius: '6px', boxShadow: '0 4px 20px rgba(0,0,0,0.5)', maxWidth: 'calc(100vw - 24px)', maxHeight: 'calc(100vh - 24px)' }); } else { $iframe .removeClass('out') .addClass('in') .css({ position: 'absolute', width: '100%', height: '100%', right: 'auto', bottom: 'auto', left: 0, top: 0, zIndex: 'auto', borderRadius: 0, boxShadow: 'none' }); } } function debounce(fn, delay=60) { let timer; return (...args)=>{ clearTimeout(timer); timer = setTimeout(()=>fn(...args), delay); } } const debounceScroll = debounce(switchMiniPlayer); const debounceResize = debounce(switchMiniPlayer,120); $(window).on('load', switchMiniPlayer); $(window).scroll(debounceScroll); $(window).resize(debounceResize); $('img,iframe').on('load', switchMiniPlayer); })();