youtube icon indicating copy to clipboard operation
youtube copied to clipboard

Autplay not working. Ver 4.820

Open sonal-g123 opened this issue 1 year ago • 76 comments

By autoplay, I mean the video I click on, not the videos lined up in my playlist. This play button has not been working for months now and I have to manually click on the "play" button on the 20+ videos I watch daily

Not sure if this is a bug or if it's bc of YT's changed algorithm, but is it possible to take a look at it?

Thank you <3

sonal-g123 avatar Mar 31 '24 17:03 sonal-g123

Are you sure this is ImproveTube. If anything ImproveTube has trouble pausing videos in the first place. Try temporarily disabling it and browsing YT for few hours.

raszpl avatar Apr 04 '24 12:04 raszpl

Are you sure this is ImproveTube. If anything ImproveTube has trouble pausing videos in the first place. Try temporarily disabling it and browsing YT for few hours.

I did. I uninstalled all extensions except IT and nothing changed. I uninstalled IT and kept all my other extensions, and YT videos started auto playing. I tried it with both their main and Beta extensions - the result was the same. I finally decided to permanently remove this extension from my browser. It's wonderful, but I really loathe having to manually click play on 20+ videos on a daily basis.

sonal-g123 avatar Apr 08 '24 02:04 sonal-g123

Did you switch Autoplay in options of ImproveTube? The only way for ImproveTube to do anything to video playback is for you to switch Autoplay off first.

raszpl avatar Apr 08 '24 09:04 raszpl

I tried both on and off for autoplay. Didn't work for either

On Monday, April 8, 2024, Rasz_pl @.***> wrote:

Did you switch Autoplay in options of ImproveTube? The only way for ImproveTube to do anything to video playback is for you to switch Autoplay off first.

— Reply to this email directly, view it on GitHub https://github.com/code-charity/youtube/issues/2137#issuecomment-2042244191, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLZPK3HQQL4OTP5MDEULLTY4JNCRAVCNFSM6AAAAABFQSNFC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBSGI2DIMJZGE . You are receiving this because you authored the thread.Message ID: @.***>

sonal-g123 avatar Apr 09 '24 14:04 sonal-g123

I have the same issue - or a similar one. Whenever I go on YouTube and find several videos I want to watch, I use the middle mouse button to open them in individual tabs. In the past they started to autoplay, once I selected the desired tab - now they are always on pause. This doesn't happen when I open a video right away (left mouse button).

I first suspected my uBlock Origin extension but the error indeed only goes away, once I disable ImproveTube. If you require any logs or something, please let me know.

MRiCEQB avatar Apr 19 '24 12:04 MRiCEQB

Funny. I reinstalled the app and removed Ublock and noticed that videos in the same tab will autoplay, but when opened in a new tab, they don't play One of the devs said this isn't an issue from their end, so I'm not sure what more can be done at this point

On Fri, Apr 19, 2024 at 5:31 PM MRiCEQB @.***> wrote:

I have the same issue - or a similar one. Whenever I go on YouTube and find several videos I want to watch, I use the middle mouse button to open them in individual tabs. In the past they started to autoplay, once I selected the desired tab - now they are always on pause. This doesn't happen when I open a video right away (left mouse button).

I first suspected my uBlock Origin extension but the error indeed only goes away, once I disable ImproveTube. If you require any logs or something, please let me know.

— Reply to this email directly, view it on GitHub https://github.com/code-charity/youtube/issues/2137#issuecomment-2066424395, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLZPK3AIXVXTSFTBUFQG4TY6EBRDAVCNFSM6AAAAABFQSNFC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRWGQZDIMZZGU . You are receiving this because you authored the thread.Message ID: @.***>

sonal-g123 avatar Apr 25 '24 00:04 sonal-g123

When you now disable ImprovedTube, does it autoplay in the next tab?

MRiCEQB avatar Apr 25 '24 05:04 MRiCEQB

yup. seems like the default youtube setting.

On Thu, Apr 25, 2024 at 10:39 AM MRiCEQB @.***> wrote:

When you now disable ImprovedTube, does it autoplay in the next tab?

— Reply to this email directly, view it on GitHub https://github.com/code-charity/youtube/issues/2137#issuecomment-2076366382, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLZPK25XRE4FPBERAFM4HLY7CFYVAVCNFSM6AAAAABFQSNFC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZWGM3DMMZYGI . You are receiving this because you authored the thread.Message ID: @.***>

sonal-g123 avatar Apr 26 '24 03:04 sonal-g123

So (at least to my understanding) ImprovedTube does something, that causes this behavior.

MRiCEQB avatar Apr 26 '24 06:04 MRiCEQB

Default youtube setting is ALL videos Pause when opened in background tab, but start autoplaying when you click on that tab and make it active/visible.

raszpl avatar Apr 26 '24 06:04 raszpl

Default youtube setting is ALL videos Pause when opened in background tab, but start autoplaying when you click on that tab and make it active/visible.

Correct and this behavior does not work for us, as long as ImprovedTube is active. Once we disable ImprovedTube, it works as intended.

MRiCEQB avatar Apr 26 '24 07:04 MRiCEQB

hi, please open the browser console when (before or after) the issue happens to copy any errors or log message from us (not those from Youtube or third parities) @sonal-g123 @MRiCEQB
thanks!

ImprovedTube avatar Apr 26 '24 11:04 ImprovedTube

This is a bit tricky to catch, because the console needs to be activated for each tab (as fas as i can tell). So opening a new tab -> clicking it -> hitting F12, might not catch the error in time or any log at all. Here I have one entry from ImrovedTube, but that also shows up, when I open a video directly in the same window (means not in a new tab).

www.youtube.com-1714134095880.log

MRiCEQB avatar Apr 26 '24 12:04 MRiCEQB

console doesnt need to be open prior to log errors. there are no errors in your log file what browser? can you try disabling all other extensions but improvetube?

raszpl avatar Apr 26 '24 13:04 raszpl

I'm using Chrome. Disabled everything except ImprovedTube and the error still remains. Once ImprovedTube is disabled, the video start to play as expected, once I switch to their tab.

MRiCEQB avatar Apr 26 '24 14:04 MRiCEQB

thank you! @MRiCEQB
please type in the browser console yt.config_.EXPERIMENT_FLAGS (enter) rightclick on the result: copy object

@sonal-g123 @jerrk @codeClimberNT @sidonly @drnopt killthe3vil @Evoden1 @xeophyte


( then we can compare further which might be the reason https://docs.google.com/spreadsheets/d/1GidvMduxTl6jXpDCKj-sOPg8KSqDfCYO2OlCdBADaSI/edit#gid=0 )

https://github.com/code-charity/youtube/issues/1851#issuecomment-1836081643


March

without IYT extension also doesn't work. https://github.com/code-charity/youtube/issues/1809#issuecomment-2009516001

December

It just started to work for me https://github.com/code-charity/youtube/issues/1851#issuecomment-1847059103

December

And today the autoplay stopped working again ;]

#2136 (with @Jerrk's ctrl+u.txt already ) #1867 #2012

ImprovedTube avatar Apr 26 '24 15:04 ImprovedTube

I did the result twice, once when the problem occurs and then another time after clearing cookies and the problem is gone.

I ran a diff check on both of them and there is no difference

problem.txt

Jerrk avatar Apr 26 '24 15:04 Jerrk

Just as an FYI I had to format and reinstall my Windows 11 and most of the problem were fixed (not all of it!), anyway those are my flags: experimental-flags.json. One thing I think I need to mention, before formatting my computer was very slow and found similar issue using another extension to change YouTube behavior to be unreliable with respect of another computer of mine that never had issue whatsoever (lot of RAM, very powerful CPU). I don't know if actually using YouTube for a long time make you more susceptible to have those flags changed, or maybe is some sort of memory saving of the browser that in some particular condition (previously I had a lot of memory swap used and still am, but now it's very limited) will limit the functionality of the extension. I found the latter very difficult to believe but better give as much information as possible. As others have noted, clearing the browser cookie (or reinstalling the OS in my case) will fix a lot of issues.

CodeClimberNT avatar Apr 26 '24 16:04 CodeClimberNT

image


edit: hi @xeophyte! Can type console prompts just below, after the ">"

xeophyte avatar Apr 26 '24 21:04 xeophyte

https://gist.github.com/Evoden1/747254eb676cf5da1a4f8044dbe64757

the yt.config_.EXPERIMENT_FLAGS result

Evoden1 avatar Apr 26 '24 21:04 Evoden1

I'm glad other people spoke up about this issue. Previously, I was the only one and Admin told me that they weren't facing thay issue from their end, and that was that.

On Saturday, April 27, 2024, Evoden1 @.***> wrote:

https://gist.github.com/Evoden1/747254eb676cf5da1a4f8044dbe64757

the yt.config_.EXPERIMENT_FLAGS result

— Reply to this email directly, view it on GitHub https://github.com/code-charity/youtube/issues/2137#issuecomment-2080163545, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLZPK3X5ATWAARK67SILCDY7LD3JAVCNFSM6AAAAABFQSNFC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBQGE3DGNJUGU . You are receiving this because you were mentioned.Message ID: @.***>

sonal-g123 avatar Apr 27 '24 01:04 sonal-g123

Ok, since we have couple of you here able to trigger this reliably. Experiment:

  • search for /js&css/web-accessible/player.js file on your disk, should be in Chrome \User Data\Default\Extensions\ directory somewhere.
  • open in text editor
  • search for "setTimeout(function () { video.pauseVideo(); }); " and delete this line
  • save file
  • reload YT page, usually works off the bat, sometimes requires manually reloading extensions or just restarting browser.

edit: hi @raszpl! applies with unzipped "developer mode" installations. If it was installed from the webstore, modifying and reloading an extension will be noticed as corrupted and won't load.

raszpl avatar Apr 27 '24 10:04 raszpl

I deleted setTimeout(function () { video.pauseVideo(); }); and restarted browser and extension and still have no autoplay.

xeophyte avatar Apr 28 '24 10:04 xeophyte

just to make sure it was correct file, can you also paste full location of /js&css/web-accessible/player.js you were editing? and copy result of JSON.stringify(ImprovedTube.storage) command from console. the only other spot where extension tries to pause is with enabled playerAutopauseWhenSwitchingTabs and pause message https://github.com/search?q=repo%3Acode-charity%2Fyoutube%20pauseVideo&type=code, but those dont fire on their own

raszpl avatar Apr 28 '24 10:04 raszpl

\AppData\Local\Vivaldi\User Data\Default\Extensions\bnomihfieiccainjcjblhegjgglakjdd\4.826_0\js&css\web-accessible\www.youtube.com\player.js

and copy result of JSON.stringify(ImprovedTube.storage) command from console.

I don't know how to do it. There is no result when I paste it on YT page image

xeophyte avatar Apr 28 '24 11:04 xeophyte

paste JSON.stringify(ImprovedTube.storage) after blue > and hit enter

raszpl avatar Apr 28 '24 17:04 raszpl

'{"ads":"all_videos","always_show_progress_bar":true,"below_player_loop":false,"below_player_pip":false,"below_player_screenshot":false,"channel_default_tab":"/videos","channel_trailer_autoplay":false,"description":"normal","duration_with_speed":true,"header_position":"hover_on_video_page","header_transparent":true,"hide_clip_button":"hidden","hide_download_button":"hidden","hide_more_button":false,"hide_report_button":true,"hide_save_button":"normal","hide_share_button":"hidden","hide_thanks_button":"hidden","hide_voice_search_button":true,"improvedtube_home":"list","it_analyzer":true,"it_blocklist":true,"it_channel":true,"it_mixer":true,"it_playlist":true,"it_shortcuts":false,"it_themes":true,"language":"en","layer_animation_scale":"1","likes":"normal","livechat":"collapsed","mini_player":true,"only_one_player_instance_playing":true,"player_always_repeat":false,"player_autoplay":true,"player_autoplay_button":true,"player_force_speed_on_music":false,"player_forced_playback_speed":false,"player_hide_controls":"off","player_loudness_normalization":true,"player_miniplayer_button":true,"player_playback_speed":1.25,"player_quality":"hd1080","player_remaining_duration":true,"player_repeat_button":true,"player_screen_button":true,"player_show_cards_on_mouse_hover":true,"player_transparent_background":false,"player_view_button":true,"red_dislike_button":true,"related_videos":"hidetabs","remove_home_page_shorts":true,"remove_subscriptions_shorts":true,"shortcut_decrease_playback_speed":{"alt":false,"ctrl":false,"keys":{"40":{"code":"ArrowDown","key":"ArrowDown"}},"shift":false,"wheel":0},"shortcut_decrease_volume":{"alt":false,"ctrl":false,"keys":{"98":{"code":"Numpad2","key":"2"}},"shift":false,"wheel":0},"shortcut_increase_playback_speed":{"alt":false,"ctrl":false,"keys":{"38":{"code":"ArrowUp","key":"ArrowUp"}},"shift":false,"wheel":0},"shortcut_increase_volume":{"alt":false,"ctrl":false,"keys":{"104":{"code":"Numpad8","key":"8"}},"shift":false,"wheel":0},"shortcut_next_video":{"alt":false,"ctrl":false,"keys":{"190":{"code":"Period","key":"."}},"shift":false,"wheel":0},"shortcut_playback_speed_step":0.25,"shortcut_prev_video":{"alt":false,"ctrl":false,"keys":{"188":{"code":"Comma","key":","}},"shift":false,"wheel":0},"theme":"dark","theme_primary_color":[200,200,200],"theme_text_color":[25,25,25],"thumbnails_hide":false,"thumbnails_right":false,"up_next_autoplay":true}'

xeophyte avatar Apr 28 '24 17:04 xeophyte

you didnt copy the whole thing :( paste command, press Enter, then whole config will appear, then double click it and copy/paste


( edit: @xeophyte exported the ImprovedTube settings )

raszpl avatar Apr 28 '24 22:04 raszpl

Firefox, and win 11. Right click a video and choose "Open in new tab", video opens in pause. Should auto play. When i open i current tab (just click) it works every time. Default settings beside "Forced theater mode" and "Player size" to full height. Cannot find "player.js" in any place. Where is it in Firefox?

DrNopt avatar Apr 30 '24 21:04 DrNopt

Ok, since we have couple of you here able to trigger this reliably. Experiment:

* search for /js&css/web-accessible/player.js file on your disk, should be in Chrome \User Data\Default\Extensions\ directory somewhere.

* open in text editor

* search for "setTimeout(function () {  video.pauseVideo();  }); " and delete this line

* save file

* reload YT page, usually works off the bat, sometimes requires manually reloading extensions or just restarting browser.

didnt do anything for me.

C:\Users\Jerrk\AppData\Local\Chromium\User Data\Default\Extensions\bnomihfieiccainjcjblhegjgglakjdd\4.826_0\js&css\web-accessible\www.youtube.com\player.js

just to make sure it was correct file, can you also paste full location of /js&css/web-accessible/player.js you were editing? and copy result of JSON.stringify(ImprovedTube.storage) command from console. the only other spot where extension tries to pause is with enabled playerAutopauseWhenSwitchingTabs and pause message https://github.com/search?q=repo%3Acode-charity%2Fyoutube%20pauseVideo&type=code, but those dont fire on their own

output from JSON.stringify(ImprovedTube.storage)

{"ads":"block_all","always_show_progress_bar":false,"analyzer_activation":false,"below_player_loop":false,"below_player_pip":false,"below_player_screenshot":false,"blacklist_activate":false,"channel_default_tab":"/videos","channel_play_all_button":true,"channel_trailer_autoplay":false,"channel_videos_count":true,"chapters":false,"collapse_of_subscription_sections":true,"compactSpacing":false,"default_content_country":"SE","description":"normal","duration_with_speed":true,"forced_theater_mode":true,"ga":1668365621239,"header_hide_country_code":true,"header_hide_right_buttons":false,"header_improve_logo":false,"header_position":"hover_on_video_page","hide_animated_thumbnails":true,"hide_footer":true,"hide_gradient_bottom":false,"hide_more_button":true,"hide_playlist":false,"hide_save_button":true,"hide_share_button":false,"hide_thumbnail_overlay":true,"hide_voice_search_button":true,"how_long_ago_the_video_was_uploaded":true,"improvedtube_home":"list","limit_page_width":true,"livechat":"normal","mark_watched_videos":true,"no_page_margin":false,"only_one_player_instance_playing":false,"open_new_tab":true,"player_SDR":false,"player_ads":"block_all","player_always_repeat":false,"player_autofullscreen":true,"player_autopause_when_switching_tabs":false,"player_autoplay":true,"player_dont_speed_education":false,"player_force_speed_on_music":false,"player_forced_playback_speed":true,"player_forced_volume":true,"player_hd_thumbnail":true,"player_hide_annotations":true,"player_hide_cards":true,"player_loudness_normalization":false,"player_playback_speed":2,"player_popup_button":true,"player_quality":"hd1080","player_remaining_duration":true,"player_repeat_button":false,"player_rotate_button":true,"player_screenshot_button":true,"player_show_cards_on_mouse_hover":true,"player_size":"full_window","playlist_repeat":false,"playlist_reverse":true,"playlist_shuffle":false,"red_dislike_button":true,"related_videos":"collapsed","remove_history_shorts":true,"remove_home_page_shorts":true,"remove_related_search_results":true,"remove_shorts_reel_search_results":true,"remove_subscriptions_shorts":true,"remove_trending_shorts":true,"schedule":"system_peference_dark","shortcut_decrease_playback_speed":{"alt":false,"ctrl":false,"keys":{"189":{"code":"Slash","key":"-"}},"shift":false,"wheel":0},"shortcut_increase_playback_speed":{"alt":false,"ctrl":false,"keys":{"187":{"code":"Minus","key":"+"}},"shift":false,"wheel":0},"shortcut_playback_speed_step":0.25,"sidebar_left":false,"theme":"black","theme_primary_color":[200,200,200],"theme_text_color":[25,25,25],"thumbnails_hide":true,"thumbnails_quality":"maxresdefault","thumbnails_right":false,"title_version":true,"track_watched_videos":true,"transcript":false,"up_next_autoplay":false,"watched":-----1MB of watched info-----,"youtube_home_page":"/feed/subscriptions","youtube_language":"en"}

Clearing cookies and site data for youtube and google fixed the issue again, same as just hitting the i key twice to switch to miniplayer and back.


I don't actually think that the problem is with improvedtube since i have another extension youtube custom speed that has the exact same issue where it will not load when opening a video in a new tab, but will load if i activate the miniplayer on and off. same behaviour when navigating to a different video it will just work.

I've also noticed that when loading a video in a new tab, the youtube page seems to delay the video load for some reason (ad-blocking maybe?) which may be the issue that i'm running in to. chrome_HicsfEonoC

This is the load after clearing cookies: chrome_9reAJ2Mmo1

It both autoplays AND goes into fullscreen as expected, youtube custom speed also loads as expected image chrome_woZOxSyFl0

So maybe improvedtube can run a refresh on the player element if it can detect that the settings did not load properly (like toggling the miniplayer does)? if that is even possible

Jerrk avatar May 01 '24 00:05 Jerrk