Open ImprovedTube opened 1 year ago
There must be another more efficient way of disabling autoplay. Current https://github.com/code-charity/youtube/blob/f6e49b11fea9bedd7f471a884675485cc59e8f31/js%26css/web-accessible/functions.js#L296 still allows for a sub second play time and fetches few seconds of video to a buffer :(. On the other hand YT detects if viewport is visible/tab active and will not start playing at all if you open YT page in the background until you switch to that tab.
There must be another more efficient way of disabling autoplay. Current
still allows for a sub second play time and fetches few seconds of video to a buffer :(. On the other hand YT detects if viewport is visible/tab active and will not start playing at all if you open YT page in the background until you switch to that tab.
hi! @raszpl, btw
should we try the stop() function as possible or repeatedly within 0.x seconds? @dodieboy thought about this before after youtube removed a function.
this one: https://github.com/code-charity/youtube/blob/6f6a592a14834c4fd3aba890a30498904f2823e2/js%26css/web-accessible/functions.js#L173-L176 was placed critically/misplaced, because depending what changes over time during the sessions, our mutation handler could reach there too (https://github.com/code-charity/youtube/blob/master/js%26css/web-accessible/init.js )
stop() function as possible or repeatedly within 0.x seconds?
pause works fine in other extensions, just need to slightly rework where its being called as for reliably pausing every time this needs to be removed https://github.com/code-charity/youtube/blob/7014a799a8f2facdbf073875b410fa130469f019/js%26css/web-accessible/www.youtube.com/player.js#L18-L21 I have no idea what its for, but its breaking autoplayDisable
https://github.com/code-charity/youtube/blob/2a88783398daa257dfa08f6d05517432d4d347d5/js%26css/web-accessible/functions.js#L246-L258