fix: prevent ~1s autoplay flash when autoplay is disabled (#1461)#3936
fix: prevent ~1s autoplay flash when autoplay is disabled (#1461)#3936jiangyj545 wants to merge 1 commit into
Conversation
…ty#1461) When player_autoplay_disable is active and a video URL is opened in a new tab, YouTube's player API (pauseVideo) has inherent latency because it must wait for the yt-player wrapper to initialize. During this gap the video plays for about 1 second, which is enough for YouTube to register the view in watch history. Fix: call the native HTML5 video.pause() on the underlying <video> element BEFORE calling the YouTube player API. The HTML5 pause is near-instant (no wrapper latency), so playback stops immediately instead of after ~1 second. The YouTube API call is kept as a synchronisation fallback.
|
Hi and thanks! @jiangyj545 please let clear how serious each of your contributions is. We might appreciate LLM experiments too, yet not knowing what we are looking at is an unnecessary loss of efficiency and respectful workflow.
let's find out more? 1461 might not be fully uptodate? 6 years ago the following was replaced with .pauseVideo()
|
(Text assumed to be LLM spam removed)