Skip to content

Commit

Permalink
Improved disable autoplay
Browse files Browse the repository at this point in the history
This should fix disable autoplay still play for a milisecond before the video pause when video is open using new tab.

code-charity#1703
  • Loading branch information
dodieboy committed Jul 29, 2023
1 parent 3e1b34e commit ffed3ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js&css/web-accessible/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ ImprovedTube.ytElementsHandler = function (node) {
} else if (id === 'movie_player') {
if (!this.elements.player) {
ImprovedTube.elements.player = node;
ImprovedTube.elements.player.stopVideo();
ImprovedTube.elements.video = node.querySelector('video');
ImprovedTube.elements.player_left_controls = node.querySelector('.ytp-left-controls');
ImprovedTube.elements.player_thumbnail = node.querySelector('.ytp-cued-thumbnail-overlay-image');
Expand Down

0 comments on commit ffed3ce

Please sign in to comment.