Skip to content

Commit

Permalink
feat: add specific playback speed option and update localization strings
Browse files Browse the repository at this point in the history
  • Loading branch information
ImBIOS committed Dec 30, 2024
1 parent 1e9e926 commit d3e1602
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
15 changes: 9 additions & 6 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
{
"qualityWhenRunningOnBattery":{
"message": "Quality, when running on battery"
},
"pauseWhileIUnplugTheCharger":{
"message": "Pause when I unplug the charger"
"message": "Pause when I unplug the charger"
},
"whenBatteryIslowDecreaseQuality":{
"message": "Low battery: Decrease the quality"
},
"analytics": {
"message": "Analytics"
},
},
"purchase": {
"message": "Purchase"
},
},
"join": {
"message": "Join"
},
},
"improvedTubeSidePanel": {
"message": "ImprovedTube: Browser Sidepanel"
},
Expand All @@ -28,7 +28,7 @@
},
"popupAd": {
"message": "Pop-up ad: Hide"
},
},
"hideWatchedVideos": {
"message": "Hide watched videos"
},
Expand Down Expand Up @@ -962,6 +962,9 @@
"playbackSpeed": {
"message": "Playback speed"
},
"specificPlaybackSpeed": {
"message": "Enable specific playback speed for playlists"
},
"player": {
"message": "Player"
},
Expand Down
1 change: 1 addition & 0 deletions js&css/web-accessible/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ document.addEventListener('it-message-from-extension', function () {

case 'playerPlaybackSpeed':
case 'playerForcedPlaybackSpeed':
case '':
if (ImprovedTube.storage.player_forced_playback_speed === true && isFinite(Number(ImprovedTube.storage.player_playback_speed))) {
ImprovedTube.playbackSpeed (Number(ImprovedTube.storage.player_playback_speed)); //new
ImprovedTube.elements.player.setPlaybackRate(Number(ImprovedTube.storage.player_playback_speed));
Expand Down
9 changes: 9 additions & 0 deletions menu/skeleton-parts/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ extension.skeleton.main.layers.section.player.on.click = {
max: 3.17,
step: .01
},
player_specific_playback_speed: {
component: 'slider',
text: 'specificPlaybackSpeed',
textarea: true,
value: 1,
min: .01,
max: 3.17,
step: .01
},
autofullscreen: {
component: 'switch',
text: 'autoFullscreen',
Expand Down

0 comments on commit d3e1602

Please sign in to comment.