Skip to content

Commit

Permalink
Fixed forced playback speed
Browse files Browse the repository at this point in the history
  • Loading branch information
adokseo committed Apr 25, 2021
1 parent 800af8c commit fb0be67
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "'Improve YouTube!' (Video & YouTube Tools)🎧",
"short_name": "ImprovedTube",
"description": "Make YouTube tidy & powerful! YouTube Player Size Theme Quality Auto HD Colors Playback Speed Style ad block Playlist Channel H.264",
"version": "3.230",
"version": "3.232",
"default_locale": "en",
"icons": {
"128": "assets/icons/128.png",
Expand Down
11 changes: 10 additions & 1 deletion youtube-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ ImprovedTube.playerPlaybackSpeed = function(node) {

if (ImprovedTube.isset(ImprovedTube.storage.player_playback_speed) && ImprovedTube.storage.player_forced_playback_speed === true) {
try {
if (window.location.href.indexOf('music') < 0) {
if (window.location.href.indexOf('music') === -1) {
document.querySelector('.html5-video-player').querySelector('video').playbackRate = option;
}
} catch (err) {}
Expand Down Expand Up @@ -3202,13 +3202,22 @@ ImprovedTube.timeupdate = function() {
ImprovedTube.video_src = this.src;

ImprovedTube.videoUpdated();
} else if (ImprovedTube.latestVideoDuration !== this.duration) {
ImprovedTube.latestVideoDuration = this.duration;

ImprovedTube.playerQuality();
ImprovedTube.playerPlaybackSpeed();
ImprovedTube.playerVolume();
ImprovedTube.playlistUpNextAutoplay();
}
};

ImprovedTube.ended = function() {
ImprovedTube.playlistReverseOnEnded();
};

ImprovedTube.latestVideoDuration = 0;

ImprovedTube.playerUpdate = function() {
this.playerPlaybackSpeed();
this.subtitles();
Expand Down

1 comment on commit fb0be67

@ImprovedTube
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.