youtube icon indicating copy to clipboard operation
youtube copied to clipboard

Autoplay Off still have video playing in background

Open jasonycw opened this issue 2 years ago • 3 comments

1. Bug Report:

  • BUG: With Force Autoplay Off, when opening any YouTube page, the video still auto play while there is an overlay of the pause screen

https://github.com/code-charity/youtube/assets/4518597/588c81e0-8641-45fe-bba0-87e42d7e1b13

  • Browser: Chrome

  • HOW: Force Autoplay Off and then open any youtube page

  • Did YouTube change?

    • Or did our last update start the bug? Then Are any Browser errors shown? F12-key : console)
    • image
  • Does the bug not happen when you log out of YouTube? Then please copy your experiment flags list with & without the error, so we can compare: Enter: ´yt.config_.EXPERIMENT_FLAGS´ into the Browser console on youtube (F12-Key). (can also copy them from the html source(ctrl+U))

More:

  • *Expected /preferred behavior: Video not auto play and only start playing when I click on it

  • ImprovedTube Version: 4.933

  • Tested alone without other YouTube extensions or in incognito mode? Yes

  • My Settings:

    JSON
    {
    "add_scroll_to_top": false,
    "ads": "block_all",
    "below_player_loop": false,
    "below_player_pip": false,
    "below_player_screenshot": false,
    "chapters": false,
    "columns": false,
    "comments_sidebar": false,
    "comments_sidebar_scrollbars": false,
    "comments_sidebar_simple": false,
    "forced_theater_mode": true,
    "hide_playlist": false,
    "hide_shorts_remixing": false,
    "hide_sidebar": false,
    "how_long_ago_the_video_was_uploaded": true,
    "language": "en",
    "lastDarkTheme": "dark",
    "limit_page_width": true,
    "livechat": "normal",
    "mark_watched_videos": true,
    "no_page_margin": false,
    "player_ads": "block_all",
    "player_autoplay_disable": true,
    "player_crop_chapter_titles": false,
    "player_hd_thumbnail": true,
    "player_loudness_normalization": false,
    "player_quality": "highres",
    "related_videos": "normal",
    "sidebar_left": false,
    "theme": "dark",
    "theme_primary_color": [
        200,
        200,
        200
    ],
    "theme_text_color": [
        25,
        25,
        25
    ],
    "thumbnails_hide": false,
    "thumbnails_right": false,
    "track_watched_videos": true,
    "transcript": false,
    "youtube_home_page": "/feed/subscriptions"
    }
    
  • OS: Windows 11

  • Device: Desktop PC

jasonycw avatar May 17 '24 13:05 jasonycw

Yes, I am having this issue too on th elatest version of Chrome on MacOS, since the 4.933 update today. Skipping to a part of the video takes you there and clears the issue.

davisstu avatar May 17 '24 14:05 davisstu

Yes, 4.933 is bad :( https://github.com/code-charity/youtube/pull/2272#issuecomment-2117682059 . no idea why it was released :(

for a quick fix disable "Force Autoplay Off" or find 4.933_0\js&css\web-accessible\www.youtube.com\player.js on your disk and edit it replacing

		let player; let tries=0;
		(function waitForPlayer(){if(player=this.elements.player||videoElement.closest('#movie_player')){return;}
						else if(tries++<4){
							console.log("autoplayOff is waiting for ImprovedTube.elements.player or #movie_player");
							setTimeout(waitForPlayer,500);
						}else if(tries===4){console.error("resigning autoplayOff after 1.5s")}
		})()

with const player = this.elements.player || videoElement.closest('#movie_player');

raszpl avatar May 17 '24 14:05 raszpl

This behaviour started with YouTube Shorts some months ago (don't watch them enough to have bothered reporting). Issue with regular YT videos started today for me: 5/17/2024 Video would load, play, then freeze on a "Play" button with audio continuing in the background. No input can stop audio or toggle video to play. Disable "Force Autoplay Off" does not yield any [results]

Current Settings: improvedtube.json

Browser: Edge 124.0.2478.80 Windows 10 Pro IYT version 4.933

*edit: How I know it's the ext causing issue: Disabled ext: OK

limited-ninja avatar May 17 '24 15:05 limited-ninja