PageSourceSearch

https://xoigac.top/dist/js/live-player-controls.js?v=IqbMQLv6l76IikE6XRak1WkXghnc095cCMJjn27ICrA

js xoigac.top collected 2026-10-10 02:21:52 UTC 35,749 bytes, 1 lines download raw bytes

1!function(){"use strict";function t(key,fallback){return window.L&&"function"==typeof window.L.T?window.L.T(key):fallback}function resolveIvsAdapter(video){return video?"focusLivePlayer"===video.id&&"function"==typeof window.getFocusIvsAdapter?window.getFocusIvsAdapter():"livePlayer"===video.id?window.ivsPlayerAdapter||null:"beautyWatchVideo"===video.id&&window.beautyWatchIvsAdapter?window.beautyWatchIvsAdapter:null:null}function resolveHlsInstance(video){return video?"focusLivePlayer"===video.id&&"function"==typeof window.getFocusHlsInstance?window.getFocusHlsInstance():"livePlayer"===video.id&&"function"==typeof window.getDetailHlsInstance?window.getDetailHlsInstance():null:null}function isWebRtcVideo(video){if(!video)return!1;if(video.srcObject)return!0;const container=function getPlayerContainer(video){return video?.closest("#focusPlayerContainer, #livePlayerContainer, .focus-player-container, .live-player-container, .beauty-watch-player, .manual-football-watch-player")}(video),type=(container?.dataset?.streamingType||container?.dataset?.streaming||"").toUpperCase();return"WEBRTC"===type||"LIVEKIT"===type}function isPaused(video){const adapter=resolveIvsAdapter(video);return adapter&&adapter.player&&"function"==typeof adapter.player.isPaused?adapter.player.isPaused():video.paused}function playVideo(video){const adapter=resolveIvsAdapter(video);adapter&&"function"==typeof adapter.play?adapter.play():video.play().catch(()=>{})}function getLiveLagSeconds(video){if(!video||isPaused(video))return Number.POSITIVE_INFINITY;if(isWebRtcVideo(video))return 0;const adapter=resolveIvsAdapter(video);if(adapter?.player&&"function"==typeof adapter.player.getLiveLatency){const latency=adapter.player.getLiveLatency();if(null!=latency&&Number.isFinite(latency))return Math.max(0,latency)}const edge=function getLiveEdgeTime(video){const hls=resolveHlsInstance(video);if(hls&&Number.isFinite(hls.liveSyncPosition)&&hls.liveSyncPosition>0)return hls.liveSyncPosition;if(video.seekable&&video.seekable.length>0){const edge=video.seekable.end(video.seekable.length-1);if(Number.isFinite(edge)&&edge>0)return edge}const adapter=resolveIvsAdapter(video);if(adapter?.player&&"function"==typeof adapter.player.getDuration){const duration=adapter.player.getDuration();if(Number.isFinite(duration)&&duration>0&&duration<1e15)return duration}return null}(video);if(null!=edge&&Number.isFinite(video.currentTime)){const lag=edge-video.currentTime;if(Number.isFinite(lag))return Math.max(0,lag)}return 0}function clearBehindLive(container){container&&delete container.dataset.playbackBehindLive}function setUserPaused(container,paused){container&&(paused?container.dataset.userPausedLive="true":delete container.dataset.userPausedLive)}function isAtLiveEdge(video,container){return!isPaused(video)&&("true"!==container?.dataset.playbackBehindLive&&getLiveLagSeconds(video)<=5)}async function syncToLiveLightweight(video){return"focusLivePlayer"===video.id&&"function"==typeof window.resyncFocusLiveStream?window.resyncFocusLiveStream():"livePlayer"===video.id&&"function"==typeof window.resyncDetailLiveStream?window.resyncDetailLiveStream():function seekToLiveEdgeOnly(video){const adapter=resolveIvsAdapter(video);if(adapter&&"function"==typeof adapter.seekToLive&&adapter.seekToLive())return playVideo(video),!0;const hls=resolveHlsInstance(video);if(hls&&Number.isFinite(hls.liveSyncPosition)&&hls.liveSyncPosition>0)return video.currentTime=hls.liveSyncPosition,playVideo(video),!0;if(video.seekable&&video.seekable.length>0){const liveEdge=video.seekable.end(video.seekable.length-1);return video.currentTime=Math.max(0,liveEdge-.5),playVideo(video),!0}return!1}(video)}async function jumpToLiveLikeRefresh(video,container){delete container.dataset.userPausedLive;return await syncToLiveLightweight(video)?(isWebRtcVideo(video)?container.dataset.pendingLiveSync="true":clearBehindLive(container),!0):(container.dataset.pendingLiveSync="true",!!function reloadLiveStream(video){return"focusLivePlayer"===video.id&&"function"==typeof window.reloadFocusStream?(window.reloadFocusStream(),!0):"livePlayer"===video.id&&"function"==typeof window.retryDetailPlayback&&(window.retryDetailPlayback(),!0)}(video)||(delete container.dataset.pendingLiveSync,!1))}function disableNativeVideoControls(video){if(video){try{video.controls=!1}catch(_){}video.removeAttribute("controls")}}function updateLiveEdgeButton(ui,video,container){const liveBtn=ui.querySelector(".live-edge-btn");if(!liveBtn)return;const atLive=isAtLiveEdge(video,container),paused=isPaused(video),canClick=!atLive||paused;liveBtn.classList.toggle("is-at-live",atLive),liveBtn.classList.toggle("is-behind-live",!atLive),liveBtn.classList.toggle("is-live-disabled",!canClick),liveBtn.disabled=!canClick,liveBtn.setAttribute("aria-disabled",canClick?"false":"true"),liveBtn.setAttribute("aria-label",atLive?t("match.player.liveNow","Live"):t("match.player.syncLive","Go live")),liveBtn.setAttribute("title",atLive?t("match.player.liveNow","Live"):t("match.player.syncLive","Go live"))}function refreshUi(ui,video,container){!function updateCenterButton(ui,video){const centerBtn=ui.querySelector(".live-player
1-center-btn"),playIcon=ui.querySelector(".live-player-icon-play"),pauseIcon=ui.querySelector(".live-player-icon-pause");if(!centerBtn||!playIcon||!pauseIcon)return;const paused=isPaused(video);playIcon.classList.toggle("is-hidden",!paused),pauseIcon.classList.toggle("is-hidden",paused);const centerVisible=paused||!0===ui._centerFlashActive;centerBtn.classList.toggle("is-hidden",!centerVisible),ui.classList.toggle("is-center-visible",centerVisible),centerBtn.setAttribute("aria-label",paused?t("match.player.play","Play"):t("match.player.pause","Pause"))}(ui,video),function updateMuteButton(ui,video){const muteBtn=ui.querySelector(".live-mute-btn");if(!muteBtn)return;const muted=video.muted||0===video.volume;muteBtn.querySelector(".live-icon-muted")?.classList.toggle("is-hidden",!muted),muteBtn.querySelector(".live-icon-unmuted")?.classList.toggle("is-hidden",muted),muteBtn.setAttribute("aria-label",muted?t("match.player.unmute","Unmute"):t("match.player.mute","Mute")),muteBtn.setAttribute("title",muted?t("match.player.unmute","Unmute"):t("match.player.mute","Mute"))}(ui,video),updateLiveEdgeButton(ui,video,container);const volumeSlider=ui.querySelector(".live-volume-slider");volumeSlider&&(volumeSlider.value=video.muted?0:video.volume)}function showUi(ui,video,container){ui&&video&&(ui.closest(".has-not-live-overlay")?ui.classList.add("is-hidden"):(ui.classList.remove("is-hidden"),ui.setAttribute("aria-hidden","false"),refreshUi(ui,video,container)))}function setBarVisible(ui,video,container,visible){ui.classList.toggle("is-bar-visible",visible),refreshUi(ui,video,container)}var mobileFsCleanupBound=!1,autoLandscapeBound=!1,autoLandscapeTimer=null,userGesturedPlayers=Object.create(null),mobileFsMode="normal",cssVideoFsContainer=null,orientationSyncPausedUntil=0;function setMobileFsMode(mode){"normal"===(mobileFsMode="chat"===mode||"video"===mode?mode:"normal")&&!1}function getNativeFullscreenElement(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||null}function exitNativeFullscreen(){const exit=document.exitFullscreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen;if(!exit||!getNativeFullscreenElement())return Promise.resolve();try{return Promise.resolve(exit.call(document)).catch(()=>{})}catch(_){return Promise.resolve()}}function requestNativeFullscreen(target){const request=target.requestFullscreen||target.webkitRequestFullscreen||target.mozRequestFullScreen||target.msRequestFullscreen;if(!request)return Promise.resolve();try{return Promise.resolve(request.call(target)).catch(()=>{})}catch(_){return Promise.resolve()}}function isMobilePlaybackDevice(){if(window.DeviceDetector&&"function"==typeof window.DeviceDetector.isMobile)try{if(window.DeviceDetector.isMobile())return!0}catch(_){}const ua=navigator.userAgent||"";return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(ua)||navigator.maxTouchPoints>1&&/MacIntel/i.test(navigator.platform||"")}function isLandscape(){try{if(window.matchMedia){if(window.matchMedia("(orientation: landscape)").matches)return!0;if(window.matchMedia("(orientation: portrait)").matches)return!1}}catch(_){}return window.innerWidth>window.innerHeight+48}function isCssVideoFullscreen(){return!(!cssVideoFsContainer||!cssVideoFsContainer.classList.contains("live-css-video-fs"))}function tryEnterImmersiveNativeFullscreen(container){return container?getNativeFullscreenElement()?Promise.resolve(!0):requestNativeFullscreen(container).then(()=>!!getNativeFullscreenElement()).catch(()=>!1):Promise.resolve(!1)}function syncCssFsViewportSize(container){if(!container||!container.classList.contains("live-css-video-fs"))return;const vv=window.visualViewport,w=Math.max(1,Math.round(vv&&vv.width?vv.width:window.innerWidth)),h=Math.max(1,Math.round(vv&&vv.height?vv.height:window.innerHeight));container.style.setProperty("position","fixed","important"),container.style.setProperty("top","0px","important"),container.style.setProperty("left","0px","important"),container.style.setProperty("right","auto","important"),container.style.setProperty("bottom","auto","important"),container.style.setProperty("width",w+"px","important"),container.style.setProperty("height",h+"px","important"),container.style.setProperty("max-width","none","important"),container.style.setProperty("max-height","none","important"),container.style.setProperty("transform","none","important"),container.style.setProperty("margin","0","important"),container.style.setProperty("padding","0","important"),container.style.setProperty("padding-top","0","important"),container.style.setProperty("z-index","2147483000","important"),container.style.setProperty("overflow","hidden","important")}function restorePlayerAfterCssFs(container){container&&(!function clearCssFsViewportInline(container){container&&["position","width","height","top","left","right","bottom","max-width","max-height","transform","inset","z-index","margin","padding","padding-top","border","border-radius","overflow","display","aspect-ratio"].forEach(prop=>{container.style.removeProperty(prop)})}(container),container.classList.remove("live-css-video-fs"),container.classList.remove("is-portrait-letterbox"),container.classList.remove("live-fs-landscape-sim"),container.style.removeProperty("position"),container.offsetHeight)}var cssFsViewportBound=!1;function enterCssVideoFullscreen(container,video){container&&(bindMobileFullscreenCleanupOnce(),function bindCssFsViewportSyncOnce(){if(cssFsViewportBound)return;cssFsViewportBound=!0;const refresh=()=>{cssVideoFsContainer&&cssVideoFsContainer.classList.contains("live-css-video-fs")&&syncCssFsViewportSize(cssVideoFsContainer)};window.addEventListener("resize",refresh),window.addEventListener("orientationchange",()=>{window.setTimeout(refresh,50),window.setTimeout(refresh,250),window.setTimeout(refresh,500)}
1),window.visualViewport&&window.visualViewport.addEventListener("resize",refresh)}(),markPlayerGestured(video),cssVideoFsContainer&&cssVideoFsContainer!==container&&exitCssVideoFullscreen(),cssVideoFsContainer=container,container.classList.add("live-css-video-fs"),document.documentElement.classList.add("live-css-video-fs"),document.body.classList.add("live-css-video-fs"),document.body.style.overflow="hidden",syncCssFsViewportSize(container),window.requestAnimationFrame(()=>syncCssFsViewportSize(container)),window.setTimeout(()=>syncCssFsViewportSize(container),100),window.setTimeout(()=>syncCssFsViewportSize(container),300),function bindCssFsTapToImmerse(container,video){container&&"true"!==container.dataset.cssFsTapBound&&(container.dataset.cssFsTapBound="true",container.addEventListener("pointerdown",function onFsTap(){container.classList.contains("live-css-video-fs")&&(getNativeFullscreenElement()||(markPlayerGestured(video),tryEnterImmersiveNativeFullscreen(container).then(ok=>{ok&&container.classList.remove("is-portrait-letterbox")})))},{passive:!0}))}(container,video),tryEnterImmersiveNativeFullscreen(container).then(()=>{syncCssFsViewportSize(container)}))}function exitCssVideoFullscreen(){const targets=[];cssVideoFsContainer&&targets.push(cssVideoFsContainer),document.querySelectorAll(".live-css-video-fs").forEach(el=>{el!==document.documentElement&&el!==document.body&&targets.indexOf(el)<0&&targets.push(el)}),targets.forEach(restorePlayerAfterCssFs),cssVideoFsContainer=null,document.documentElement.classList.remove("live-css-video-fs"),document.body.classList.remove("live-css-video-fs"),document.body.style.overflow="",document.body.style.removeProperty("overflow")}function unlockOrientation(){const orientation=screen.orientation||screen.mozOrientation||screen.msOrientation;if(orientation&&"function"==typeof orientation.unlock)try{orientation.unlock()}catch(_){}}function clearLandscapeSim(container){container&&container.classList.remove("live-fs-landscape-sim"),document.querySelectorAll(".live-fs-landscape-sim").forEach(el=>{el.classList.remove("live-fs-landscape-sim")})}function afterEnterNativeFullscreen(container){const fsEl=getNativeFullscreenElement();return fsEl&&(fsEl===container||container&&container.contains(fsEl))?isLandscape()?(clearLandscapeSim(container),unlockOrientation(),container&&container.classList.remove("is-portrait-letterbox"),Promise.resolve()):(clearLandscapeSim(container),unlockOrientation(),container&&container.classList.add("is-portrait-letterbox"),Promise.resolve()):Promise.resolve()}function markPlayerGestured(video){video&&video.id&&(userGesturedPlayers[video.id]=!0)}function hasPlayerGesture(video){if(!video)return!1;if(video.id&&userGesturedPlayers[video.id])return!0;const pip=resolvePiPManager(video);return!(!pip||!pip.hasUserGesture)||!video.paused&&!video.ended}function isVideoNativeFullscreen(video){if(!video)return!1;if(video.webkitDisplayingFullscreen)return!0;const fsEl=getNativeFullscreenElement();return!(!fsEl||fsEl!==video&&!fsEl.contains(video))}function isContainerNativeFullscreen(container){const fsEl=getNativeFullscreenElement();return!(!fsEl||!container||fsEl!==container&&!container.contains(fsEl))}function cleanupMobileFullscreenState(){unlockOrientation(),clearLandscapeSim(null)}function bindMobileFullscreenCleanupOnce(){if(mobileFsCleanupBound)return;mobileFsCleanupBound=!0;const onFsChange=()=>{const fsEl=getNativeFullscreenElement();if(!fsEl)return cleanupMobileFullscreenState(),"video"===mobileFsMode&&setMobileFsMode("normal"),void(isCssVideoFullscreen()||["focusPlayerContainer","livePlayerContainer","beautyWatchPlayerContainer"].forEach(id=>{const el=document.getElementById(id);el&&("fixed"===el.style.position||el.classList.contains("live-css-video-fs"))&&restorePlayerAfterCssFs(el)}));const container=function resolveFsPlayerContainer(fsEl){if(!fsEl||1!==fsEl.nodeType)return null;const sel="#focusPlayerContainer, #livePlayerContainer, .focus-player-container, .live-player-container, .beauty-watch-player, .manual-football-watch-player";return fsEl.matches&&fsEl.matches(sel)?fsEl:fsEl.closest?fsEl.closest(sel):null}(fsEl);container&&function syncLandscapeSimForContainer(container){if(!container)return;const fsEl=getNativeFullscreenElement();fsEl===container||fsEl&&container.contains(fsEl)||container.classList.contains("live-css-video-fs")?clearLandscapeSim(container):clearLandscapeSim(container)}(container)};document.addEventListener("fullscreenchange",onFsChange),document.addEventListener("webkitfullscreenchange",onFsChange),document.addEventListener("mozfullscreenchange",onFsChange),document.addEventListener("MSFullscreenChange",onFsChange)}function ensureMobileVideoFullscreen(container,video){if(bindMobileFullscreenCleanupOnce(),markPlayerGestured(video),!container||!video)return Promise.resolve();if(function isIOSPlaybackDevice(){if(window.DeviceDetector&&"function"==typeof window.DeviceDetector.isIOS)try{if
1(window.DeviceDetector.isIOS())return!0}catch(_){}const ua=navigator.userAgent||"";return/iPhone|iPad|iPod/i.test(ua)||navigator.maxTouchPoints>1&&/MacIntel/i.test(navigator.platform||"")}()&&"function"==typeof video.webkitEnterFullscreen){if(video.webkitDisplayingFullscreen)return Promise.resolve();try{return video.webkitEnterFullscreen(),video.addEventListener("webkitendfullscreen",function onEnd(){cleanupMobileFullscreenState(),"video"===mobileFsMode&&setMobileFsMode("normal")},{once:!0}),Promise.resolve()}catch(_){}}if(isContainerNativeFullscreen(container))return afterEnterNativeFullscreen(container);const doRequest=()=>requestNativeFullscreen(container).then(()=>new Promise(resolve=>{window.requestAnimationFrame(()=>{afterEnterNativeFullscreen(container).then(resolve)})}));return getNativeFullscreenElement()?exitNativeFullscreen().then(doRequest):doRequest()}function enterMobileVideoFullscreen(container,video){return ensureMobileVideoFullscreen(container,video)}function exitMobileVideoFullscreen(container,video){if(video&&video.webkitDisplayingFullscreen&&"function"==typeof video.webkitExitFullscreen)try{video.webkitExitFullscreen()}catch(_){}return cleanupMobileFullscreenState(),container&&restorePlayerAfterCssFs(container),exitCssVideoFullscreen(),exitNativeFullscreen()}function toggleMobileVideoFullscreen(container,video){return isVideoNativeFullscreen(video)||isContainerNativeFullscreen(container)||container&&container.classList.contains("live-css-video-fs")?(setMobileFsMode("normal"),exitCssVideoFullscreen(),container&&container.classList.remove("is-portrait-letterbox"),exitMobileVideoFullscreen(container,video)):(setMobileFsMode("video"),orientationSyncPausedUntil=Date.now()+800,enterMobileVideoFullscreen(container,video).finally(()=>{isContainerNativeFullscreen(container)||isVideoNativeFullscreen(video)?container&&container.classList.add("live-css-video-fs"):enterCssVideoFullscreen(container,video),isLandscape()?container&&container.classList.remove("is-portrait-letterbox"):(clearLandscapeSim(container),unlockOrientation(),container&&container.classList.add("is-portrait-letterbox"))}))}function findNativeVideoFullscreenPlayer(){const candidates=[{containerId:"focusPlayerContainer",videoId:"focusLivePlayer"},{containerId:"livePlayerContainer",videoId:"livePlayer"},{containerId:"beautyWatchPlayerContainer",videoId:"beautyWatchVideo"}];for(let i=0;i<candidates.length;i++){const container=document.getElementById(candidates[i].containerId),video=document.getElementById(candidates[i].videoId);if(container&&video&&(isVideoNativeFullscreen(video)||isContainerNativeFullscreen(container)||container.classList.contains("live-css-video-fs")))return{container:container,video:video}}return null}function syncOrientationFullscreen(){if(!isMobilePlaybackDevice())return;if(Date.now()<orientationSyncPausedUntil)return;const active=function findActiveLivePlayerForAutoFs(){const candidates=[{containerId:"focusPlayerContainer",videoId:"focusLivePlayer"},{containerId:"livePlayerContainer",videoId:"livePlayer"},{containerId:"beautyWatchPlayerContainer",videoId:"beautyWatchVideo"}];for(let i=0;i<candidates.length;i++){const container=document.getElementById(candidates[i].containerId),video=document.getElementById(candidates[i].videoId);if(!container||!video)continue;if("true"!==container.dataset.liveControlsInit)try{initLivePlayerControls(container,video)}catch(_){}if(container.classList.contains("has-not-live-overlay"))continue;if(container.classList.contains("focus-no-stream"))continue;const rect=container.getBoundingClientRect();if(!(rect.width<2&&rect.height<2)&&(hasPlayerGesture(video)||!video.paused))return{container:container,video:video}}return null}(),landscape=window.innerWidth>window.innerHeight+24;if("chat"===mobileFsMode){if(!active||!hasChatFullscreenSupport(active.video))return;exitCssVideoFullscreen();const nativeFs=findNativeVideoFullscreenPlayer();return void(nativeFs&&isContainerNativeFullscreen(nativeFs.container)?exitMobileVideoFullscreen(nativeFs.container,nativeFs.video):Promise.resolve()).then(()=>{isChatFullscreenOpen(active.video)||function enterChatFullscreenForVideo(video){video&&(isChatFullscreenOpen(video)||("focusLivePlayer"!==video.id||"function"!=typeof window.toggleFocusPlayerFullscreen?"livePlayer"===video.id&&"function"==typeof window.togglePlayerFullscreen&&window.togglePlayerFullscreen():window.toggleFocusPlayerFullscreen()))}(active.video)})}if("video"===mobileFsMode){if(!active)return;return isChatFullscreenOpen(active.video)&&function exitChatFullscreenForVideo(video){video&&isChatFullscreenOpen(video)&&("focusLivePlayer"!==video.id||"function"!=typeof window.toggleFocusPlayerFullscreen?"livePlayer"!==video.id||"function"!=typeof window.exitPlayerFullscreen?"livePlayer"===video.id&&"function"==typeof window.togglePlayerFullscreen&&window.togglePlayerFullscreen():Promise.resolve(window.exitPlayerFullscreen()).catch(()=>{}):window.toggleFocusPlayerFullscreen())}(active.video),void(landscape?function applyVideoModeLandscapeFill(container,video){if(container){if(unlockOrientation(),clearLandscapeSim(container),container.classList.remove("is-portrait-letterbox"),isContainerNativeFullscreen(container)||isVideoNativeFullscreen(video)||container.classList.contains("live-css-video-fs"))return container.classList.add("live-css-video-fs"),void syncCssFsViewportSize(container);ensureMobileVideoFullscreen(container,video).finally(()=>{isContainerNativeFullscreen(container)||isVideoNativeFullscreen(video)?container.classList.add("live-css-video-fs"):enterCssVideoFullscreen(container,video),container.classList.remove("is-portrait-letterbox"),clearLandscapeSim(container),syncCssFsViewportSize(container)})}}(active.container,active.video):function applyVideoModePortraitLetterbox(container,video){container&&(unlockOrientation(),clearLandscapeSim(container),isContainerNativeFullscreen(container)||isVideoNativeFullscreen(video)?(container.classList.add("live-css-video-fs"),syncCssFsViewportSize(container)):enterCssVideoFullscreen(container,video),container.classList.add("live-css-video-fs"),container.classList.add("is-portrait-letterbox"),syncCssFsViewportSize(container))}(active.container,active.video))}if(landscape){if(!active)return;if(isChatFullscreenOpen(active.video))return;return enterCssVideoFullscreen(active.container,active.video),void active.container.classList.remove("is-portrait-letterbox")}if(isCssVideoFullscreen()||findNativeVideoFullscreenPlayer()){const nativeFs=findNativeVideoFullscreenPlayer(),stuck=document.getElementById("focusPlayerContainer")||document.getElementById("livePlayerContainer")||document.getElementById("beautyWatchPlayerContainer");exitCssVideoFullscreen(),nativeFs&&exitMobileVideoFullscreen(nativeFs.container,nativeFs.video),stuck&&restorePlayerAfterCssFs(stuck),document.querySelectorAll(".is-portrait-letterbox, .live-css-video-fs, .live-fs-landscape-sim").forEach(el=>{restorePlayerAfterCssFs(el)})}}function isChatFullscreenOpen(video){return"livePlayer"===video.id?!!document.getElementById("livePlayerSection")?.classList.contains("fullscreen"):"focusLivePlayer"===video.id&&!!document.getElementById("focusLiveSection")?.classList.contains("fullscreen")}function hasChatFullscreenSupport(video){return"livePlayer"===video.id?"function"==typeof window.togglePlayerFullscreen:"focusLivePlayer"===video.id&&"function"==typeof window.toggleFocusPlayerFullscreen}function resolvePiPManager(video){return video?"focusLivePlayer"===video.id?window.focusPersistentPlaybackManager?.pipManager||window.focusPiPManager||null:"livePlayer"===video.id?window.detailPersistentPlaybackManager?.pipManager||window.detailPiPManager||null:"beautyWatchVideo"===video.id&&window.beautyPiPManager||null:null}function ensureFallbackPiPManager(video){if(!video||"undefined"==typeof PiPManager)return null;const existing=resolvePiPManager(video);if(existing)return existing;const manager=new PiPManager(video,{enableDesktopAutoPiP:!0,enableMobileAutoPiP:!0});return manager.initialize(),"focusLivePlayer"===video.id?window.focusPiPManager=manager:"livePlayer"===video.id?window.detailPiPManager=manager:"beautyWatchVideo"===video.id&&(window.beautyPiPManager=manager),manager}function toggleFullscreenVideoOnly(container,video){if(isChatFullscreenOpen(video)){setMobileFsMode("video");let leaveChat=Promise.resolve();return"livePlayer"===video.id&&"function"==typeof window.exitPlayerFullscreen?leaveChat=Promise.resolve(window.exitPlayerFullscreen()).catch(()=>{}):"focusLivePlayer"===video.id&&"function"==typeof window.toggleFocusPlayerFullscreen?window.toggleFocusPlayerFullscreen():"livePlayer"===video.id&&"function"==typeof window.togglePlayerFullscreen&&window.togglePlayerFullscreen(),void leaveChat.then(()=>{isMobilePlaybackDevice()?ensureMobileVideoFullscreen(container,video):requestNativeFullscreen(container)})}(()=>
1{if(isMobilePlaybackDevice())return void toggleMobileVideoFullscreen(container,video);const fsEl=getNativeFullscreenElement();if(fsEl===container||fsEl&&container.contains(fsEl))return setMobileFsMode("normal"),void exitNativeFullscreen();setMobileFsMode("video"),fsEl?exitNativeFullscreen().then(()=>requestNativeFullscreen(container)):requestNativeFullscreen(container)})()}function bindBarControl(el,handler){el&&el.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),handler(e)})}function initLivePlayerControls(container,video){if(!container||!video||"true"===container.dataset.liveControlsInit)return;const ui=container.querySelector("[data-live-player-ui]");if(!ui)return;container.dataset.liveControlsInit="true",function bindNativeControlsGuard(video){disableNativeVideoControls(video),new MutationObserver(()=>disableNativeVideoControls(video)).observe(video,{attributes:!0,attributeFilter:["controls"]}),["loadedmetadata","playing","canplay","loadeddata"].forEach(eventName=>{video.addEventListener(eventName,()=>disableNativeVideoControls(video))})}(video);const centerBtn=ui.querySelector(".live-player-center-btn"),liveBtn=ui.querySelector(".live-edge-btn"),muteBtn=ui.querySelector(".live-mute-btn"),fullscreenChatBtn=ui.querySelector(".live-fullscreen-chat-btn"),fullscreenBtn=ui.querySelector(".live-fullscreen-btn"),volumeSlider=ui.querySelector(".live-volume-slider"),volumeControl=ui.querySelector(".live-volume-control");fullscreenChatBtn&&!hasChatFullscreenSupport(video)&&(fullscreenChatBtn.style.display="none");let hideBarTimer=null;const clearHideTimer=()=>{hideBarTimer&&(window.clearTimeout(hideBarTimer),hideBarTimer=null)},setControlsIdle=idle=>{container.classList.toggle("is-controls-idle",!!idle),idle&&setBarVisible(ui,video,container,!1)},isUiPinned=()=>!!isPaused(video)||!!volumeControl?.classList.contains("is-open"),hideControlsNow=()=>{isUiPinned()||setControlsIdle(!0)},scheduleIdleHide=()=>{clearHideTimer(),isUiPinned()||(hideBarTimer=window.setTimeout(hideControlsNow,1e4))},showBar=()=>{clearHideTimer(),setControlsIdle(!1),setBarVisible(ui,video,container,!0),scheduleIdleHide()},togglePlayback=()=>{container.querySelector(".focus-not-live-overlay, .focus-error-overlay")||(isPaused(video)?(setUserPaused(container,!1),playVideo(video)):(setUserPaused(container,!0),function markBehindLive(container){container&&(container.dataset.playbackBehindLive="true")}(container),function pauseVideo(video){const adapter=resolveIvsAdapter(video);adapter&&"function"==typeof adapter.pause?adapter.pause():video.pause()}(video)),function flashCenterButton(ui,video,container){ui&&(ui._centerFlashActive=!0,ui.classList.add("is-center-visible"),ui._centerFlashTimer&&window.clearTimeout(ui._centerFlashTimer),ui._centerFlashTimer=window.setTimeout(()=>{ui._centerFlashTimer=null,ui._centerFlashActive=!1,isPaused(video)||(ui.classList.remove("is-center-visible"),refreshUi(ui,video,container))},700),refreshUi(ui,video,container))}(ui,video,container))};if(bindBarControl(centerBtn,togglePlayback),bindBarControl(liveBtn,()=>{liveBtn.disabled||isAtLiveEdge(video,container)&&!isPaused(video)||jumpToLiveLikeRefresh(video,container).then(ok=>{ok&&refreshUi(ui,video,container)})}),bindBarControl(muteBtn,()=>{!function setVideoMuted(video,muted){const adapter=resolveIvsAdapter(video);adapter&&"function"==typeof adapter.setMuted&&adapter.setMuted(muted),video.muted=muted,muted||0!==video.volume||(video.volume=1)}(video,!video.muted),refreshUi(ui,video,container)}),volumeSlider){volumeSlider.value=video.muted?0:video.volume;const setVolumeOpen=open=>{volumeControl?.classList.toggle("is-open",open)},applyVolume=vol=>{const level=Math.max(0,Math.min(1,vol));video.volume=level;const adapter=resolveIvsAdapter(video);adapter&&"function"==typeof adapter.setVolume&&adapter.setVolume(level);const shouldMute=0===level;adapter&&"function"==typeof adapter.setMuted&&adapter.setMuted(shouldMute),video.muted=shouldMute};volumeSlider.addEventListener("input",e=>{e.stopPropagation(),applyVolume(parseFloat(volumeSlider.value)),refreshUi(ui,video,container)}),volumeSlider.addEventListener("click",e=>e.stopPropagation()),volumeSlider.addEventListener("pointerdown",e=>{e.stopPropagation(),setVolumeOpen(!0),showBar();try{volumeSlider.setPointerCapture(e.pointerId)}catch(_){}});const endVolumeDrag=()=>setVolumeOpen(!1);volumeSlider.addEventListener("pointerup",endVolumeDrag),volumeSlider.addEventListener("pointercancel",endVolumeDrag),volumeSlider.addEventListener("lostpointercapture",endVolumeDrag)}const markPiPGesture=()=>{markPlayerGestured(video);const pip=resolvePiPManager(video)||ensureFallbackPiPManager(video);pip&&"function"==typeof pip.recordUserGesture&&pip.recordUserGesture()};bindBarControl(fullscreenChatBtn,()=>{markPiPGesture(),function toggleFullscreenWithChat(container,video){const entering=!isChatFullscreenOpen(video),enterChatFullscreen=()=>{entering?(setMobileFsMode("chat"),exitCssVideoFullscreen()):setMobileFsMode("normal"),"focusLivePlayer"!==video.id||"function"!=typeof window.toggleFocusPlayerFullscreen?"livePlayer"!==video.id||"function"!=typeof window.togglePlayerFullscreen?entering&&(setMobileFsMode("video"),toggleFullscreenVideoOnly(container,video)):window.togglePlayerFullscreen():window.toggleFocusPlayerFullscreen()},fsEl=getNativeFullscreenElement();if(entering&&(fsEl||isCssVideoFullscreen())&&!isChatFullscreenOpen(video))return exit
1CssVideoFullscreen(),void exitNativeFullscreen().then(enterChatFullscreen);enterChatFullscreen()}(container,video)}),bindBarControl(fullscreenBtn,()=>{markPiPGesture(),toggleFullscreenVideoOnly(container,video)});const pipBtn=ui.querySelector(".live-pip-btn");pipBtn&&bindBarControl(pipBtn,()=>{!function togglePictureInPicture(video){if(!video)return;const pipManager=resolvePiPManager(video)||ensureFallbackPiPManager(video);pipManager&&("function"==typeof pipManager.recordUserGesture&&pipManager.recordUserGesture(),"function"==typeof pipManager.resetUserDisabled&&(pipManager.isPiPActive||pipManager.resetUserDisabled()),"function"==typeof pipManager.togglePiP)?pipManager.togglePiP().catch(e=>{console.warn("[LiveControls] PiP failed:",e?.message||e)}):console.warn("[LiveControls] PiPManager unavailable")}(video)});const attachPiP=()=>ensureFallbackPiPManager(video);attachPiP(),"undefined"==typeof PiPManager&&(window.setTimeout(attachPiP,0),window.setTimeout(attachPiP,300)),video.addEventListener("playing",markPiPGesture),container.addEventListener("pointerdown",markPiPGesture,{passive:!0}),container.addEventListener("click",e=>{(function shouldIgnoreClick(target){return!!target.closest(".live-player-bottom-bar, .live-player-center-btn, .ivs-quality-selector, .focus-player-actions, .player-more-dropdown, .error-retry-btn, .focus-play-btn, .detail-play-btn, .focus-not-live-overlay, .focus-error-overlay, .focus-loading-overlay")})(e.target)||(e.target===video||video.contains(e.target))&&togglePlayback()}),container.addEventListener("mouseenter",showBar),container.addEventListener("mouseleave",()=>{clearHideTimer(),hideBarTimer=window.setTimeout(hideControlsNow,280)}),container.addEventListener("mousemove",showBar),container.addEventListener("pointermove",showBar),container.addEventListener("touchstart",()=>{showBar()},{passive:!0}),video.addEventListener("pause",()=>{clearHideTimer(),setControlsIdle(!1),setBarVisible(ui,video,container,!0)}),video.addEventListener("play",scheduleIdleHide),video.addEventListener("playing",scheduleIdleHide);const onFullscreenChange=()=>{showBar()};document.addEventListener("fullscreenchange",onFullscreenChange),document.addEventListener("webkitfullscreenchange",onFullscreenChange);let lastTimeupdateUiAt=0;["play","pause","seeked","volumechange","loadeddata","playing"].forEach(eventName=>{video.addEventListener(eventName,()=>{refreshUi(ui,video,container),syncLiveEdgeTimer()})}),video.addEventListener("timeupdate",()=>{if(document.hidden)return;const now=Date.now();now-lastTimeupdateUiAt<400||(lastTimeupdateUiAt=now,refreshUi(ui,video,container))});new MutationObserver(()=>{container.classList.contains("has-not-live-overlay")?ui.classList.add("is-hidden"):!video.classList.contains("loaded")&&video.paused||showUi(ui,video,container)}).observe(container,{attributes:!0,attributeFilter:["class"]});let liveEdgeTimer=null;const stopLiveEdgeTimer=()=>{liveEdgeTimer&&(window.clearInterval(liveEdgeTimer),liveEdgeTimer=null)},syncLiveEdgeTimer=()=>{document.hidden||video.paused||video.ended?stopLiveEdgeTimer():(liveEdgeTimer||(liveEdgeTimer=window.setInterval(()=>{document.hidden||video.paused||video.ended?stopLiveEdgeTimer():updateLiveEdgeButton(ui,video,container)},1e3)),updateLiveEdgeButton(ui,video,container))};document.addEventListener("visibilitychange",syncLiveEdgeTimer),syncLiveEdgeTimer(),!video.classList.contains("loaded")&&video.paused||showUi(ui,video,container),video.addEventListener("loadeddata",()=>showUi(ui,video,container)),video.addEventListener("playing",()=>{"true"===container.dataset.pendingLiveSync&&(delete container.dataset.pendingLiveSync,clearBehindLive(container),refreshUi(ui,video,container)),showUi(ui,video,container)})}function boot(){bindMobileFullscreenCleanupOnce(),function bindAutoLandscapeFullscreenOnce(){if(autoLandscapeBound)return;autoLandscapeBound=!0;const schedule=()=>{autoLandscapeTimer&&window.clearTimeout(autoLandscapeTimer),autoLandscapeTimer=window.setTimeout(()=>{autoLandscapeTimer=null,syncOrientationFullscreen()},200)};window.addEventListener("orientationchange",schedule),window.addEventListener("resize",schedule);try{screen.orientation&&"function"==typeof screen.orientation.addEventListener&&screen.orientation.addEventListener("change",schedule)}catch(_){}try{if(window.matchMedia){const mq=window.matchMedia("(orientation: landscape)");"function"==typeof mq.addEventListener?mq.addEventListener("change",schedule):"function"==typeof mq.addListener&&mq.addListener(schedule)}}catch(_){}}(),initLivePlayerControls(document.getElementById("focusPlayerContainer"),document.getElementById("focusLivePlayer")),initLivePlayerControls(document.getElementById("livePlayerContainer"),document.getElementById("livePlayer")),initLivePlayerControls(document.getElementById("beautyWatchPlayerContainer"),document.getElementById("beautyWatchVideo"))}window.enterMobileVideoFullscreen=enterMobileVideoFullscreen,window.exitMobileVideoFullscreen=exitMobileVideoFullscreen,window.toggleMobileVideoFullscreen=toggleMobileVideoFullscreen,window.isMobilePlaybackDevice=isMobilePlaybackDevice,window.setMobileFsMode=setMobileFsMode,window.getMobileFsMode=function getMobileFsMode(){return mobileFsMode},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",boot):boot(),window.initLivePlayerControls=initLivePlayerControls}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.