Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
2a49a85
add silence skip feature
some-git-user Aug 8, 2025
52213b8
Merge branch 'development' into feature/skip-silence
Aug 9, 2025
e42485d
Remove all the locale files. Only keep en-us
Aug 9, 2025
00516a9
cleanup
Aug 9, 2025
61ab31f
revert to development
Aug 9, 2025
156ca59
Merge branch 'FreeTubeApp:development' into feature/skip-silence
some-git-user Aug 10, 2025
2571bb0
Merge branch 'development' into feature/skip-silence
Aug 13, 2025
b9639cb
move button inside the player
Aug 13, 2025
de85d69
Merge branch 'FreeTubeApp:development' into feature/skip-silence
some-git-user Aug 18, 2025
1535bb0
move the icon to the left of the autoplay icon
Aug 19, 2025
6e2ce03
Merge branch 'development' into feature/skip-silence
Aug 30, 2025
af1ec54
add "remember its state in the watch session"
Aug 30, 2025
660ccf7
add "a toggle in the Player settings called Enable [name of the featu…
Aug 30, 2025
e7750fa
Merge branch 'FreeTubeApp:development' into feature/skip-silence
some-git-user Sep 3, 2025
33bdf7d
Merge branch 'FreeTubeApp:development' into feature/skip-silence
some-git-user Sep 16, 2025
02fdb49
Merge branch 'development' into feature/skip-silence
some-git-user Sep 19, 2025
2fa16b1
remove duplicate value
Sep 19, 2025
75ed668
use new icon format
Sep 19, 2025
651693a
Merge branch 'development' of github.com:some-git-user/FreeTube into …
Oct 2, 2025
aa1dbdf
remove player icon
Oct 2, 2025
766bb9a
move icon into overflow menu beneath loop
Oct 2, 2025
54cd5ec
remove popup message
Oct 2, 2025
88d7593
remove unused translation
Oct 2, 2025
729e84e
alter button for overflow menu
Oct 2, 2025
efcdfcf
cancelTrickPlay does not stop trickPlay anymore? setting explicit to …
Oct 2, 2025
7c513cf
bugfix, prevent fast forward when player is paused or playback ended
Oct 2, 2025
22cdec1
Move toggle to the left side
Oct 2, 2025
c65c858
bugfix, prevent skipSilence() speed multiplier if arrow keys are used…
Oct 2, 2025
6843abe
Merge branch 'development' of github.com:some-git-user/FreeTube into …
Oct 5, 2025
c19d74c
Merge branch 'development' of github.com:some-git-user/FreeTube into …
Oct 7, 2025
9d63f44
tune silence skip logic
Oct 8, 2025
441fdd3
Merge branch 'development' of github.com:some-git-user/FreeTube into …
Oct 14, 2025
b1ea3c3
Merge branch 'development' of github.com:some-git-user/FreeTube into …
Oct 17, 2025
759a61d
Merge branch 'development' of github.com:some-git-user/FreeTube into …
Oct 30, 2025
ecbc530
fix icon name
Oct 30, 2025
338cd09
movie into player section
Oct 30, 2025
c291226
remove from "The settings below have side effects" section
Oct 30, 2025
c32e4a7
move into video event region
Oct 30, 2025
9bdcaf2
remove duplicate entry
Oct 30, 2025
a9ee002
fix watch session
Oct 30, 2025
6be694e
improve reset logic
Oct 30, 2025
b20cb98
Update src/renderer/components/ft-shaka-video-player/ft-shaka-video-p…
efb4f5ff-1298-471a-8973-3d47447115dc Oct 30, 2025
3fa2a80
Update src/renderer/components/ft-shaka-video-player/ft-shaka-video-p…
efb4f5ff-1298-471a-8973-3d47447115dc Oct 30, 2025
3546fbb
Update src/renderer/components/ft-shaka-video-player/ft-shaka-video-p…
efb4f5ff-1298-471a-8973-3d47447115dc Oct 30, 2025
2d6626f
Update src/renderer/components/ft-shaka-video-player/player-component…
some-git-user Nov 3, 2025
8081994
Update static/locales/en-US.yaml
some-git-user Nov 3, 2025
cd2b1c6
Merge branch 'development' of github.com:some-git-user/FreeTube into …
Nov 3, 2025
4f32185
fix playback rates
Nov 3, 2025
5737f36
fix translation
Nov 3, 2025
160b21d
Merge branch 'development' of github.com:some-git-user/FreeTube into …
Nov 5, 2025
d399a2a
Merge branch 'development' of github.com:some-git-user/FreeTube into …
Nov 23, 2025
1a5a789
Merge branch 'development' of github.com:some-git-user/FreeTube into …
Nov 28, 2025
37b82c4
commit suggestion
Nov 28, 2025
de639cf
Merge branch 'development' of github.com:some-git-user/FreeTube into …
Dec 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ export default defineComponent({
let startInFullscreen = props.startInFullscreen
let startInPip = props.startInPip

const isSilenceSkipEnabled = ref(false)

/**
* @type {{
* url: string,
Expand Down Expand Up @@ -2998,14 +3000,97 @@ export default defineComponent({
return uiState
}

/**
* Toggles and manages the silence skip functionality for the video player.
*
* When silence skip is enabled, the function analyzes the audio stream of the
* video to detect silent segments. If a silent segment is detected, the video
* playback speed is increased to skip over the silence.
*
* The function uses the Web Audio API to create an AudioContext and connect it
* to the video element's audio source. An AnalyserNode is used to obtain the
* time-domain data of the audio signal, which is then processed to calculate
* the maximum and average volume levels. Silence is determined by comparing
* these levels, and if the conditions for silence are met, the player's
* trickPlay method is invoked to increase the playback speed.
*
* If silence skip is disabled, the playback speed is reset to normal.
*
* The function initiates a loop using requestAnimationFrame to continuously
* analyze the audio stream as long as the player exists and silence skip is
* enabled.
*/
function skipSilence() {
if (!isSilenceSkipEnabled.value) {
showValueChange(t('SilenceSkip.Enable Silence Skip'))
isSilenceSkipEnabled.value = true
} else {
showValueChange(t('SilenceSkip.Disable Silence Skip'))
isSilenceSkipEnabled.value = false
}

const video_ = video.value

if (video_ && player) {
const audioContext = video_.audioContext ?? new AudioContext()
let source = video_.audioSource
if (!source) {
source = audioContext.createMediaElementSource(video_)
video_.audioSource = source
}
if (!video_.audioContext) {
video_.audioContext = audioContext
}
const analyser = audioContext.createAnalyser()
source.disconnect()
source.connect(analyser)
analyser.disconnect()
analyser.connect(audioContext.destination)
analyser.fftSize = 2048
const bufferLength = analyser.frequencyBinCount
const amplitudeArray = new Uint8Array(bufferLength)
let loopId = 0
const loop = () => {
if (!player) {
cancelAnimationFrame(loopId)
return
}

analyser.getByteTimeDomainData(amplitudeArray)
const volumeValues = Array.from(amplitudeArray)
const filteredVolumes = volumeValues.map(volume => volume - 128).filter(volume => volume !== 0).map(volume => Math.abs(volume))
const maxVolume = filteredVolumes.length ? Math.max(...filteredVolumes) : 0
const averageVolume = filteredVolumes.length ? filteredVolumes.reduce((a, b) => a + b, 0) / filteredVolumes.length : 0

if (isSilenceSkipEnabled.value) {
const silencePercentage = !isNaN(maxVolume) && !isNaN(averageVolume) ? (averageVolume / maxVolume) * 4 : 0

if (maxVolume <= averageVolume || maxVolume <= silencePercentage) {
player.trickPlay(2.5)
} else {
player.cancelTrickPlay()
}
} else {
player.cancelTrickPlay()
return
}

loopId = requestAnimationFrame(loop)
}

loop()
}
}

expose({
hasLoaded,

isPaused,
pause,
getCurrentTime,
setCurrentTime,
destroyPlayer
destroyPlayer,
skipSilence
})

// #endregion functions used by the watch page
Expand Down
5 changes: 5 additions & 0 deletions src/renderer/components/watch-video-info/watch-video-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export default defineComponent({
'set-info-area-sticky',
'scroll-to-info-area',
'save-watched-progress',
'skip-silence',
],
computed: {
hideSharingActions: function() {
Expand Down Expand Up @@ -372,6 +373,10 @@ export default defineComponent({
}
},

handleSkipSilence: function () {
this.$emit('skip-silence')
},

grabExtensionFromUrl: function (url) {
const regex = /\/(\w*)/i
const group = url.match(regex)
Expand Down
6 changes: 6 additions & 0 deletions src/renderer/components/watch-video-info/watch-video-info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@
:get-timestamp="getTimestamp"
:playlist-id="playlistId"
/>
<ft-icon-button
:title="$t('SilenceSkip.Skip Silence')"
theme="primary"
:icon="['fas', 'gauge']"
@click="handleSkipSilence"
/>
</span>
</div>
</div>
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,14 @@ export default defineComponent({
this.$refs.watchVideoPlaylist?.playPreviousVideo()
},

handleSkipSilence: function () {
const player = this.$refs.player
if (!player) {
return
}
player?.skipSilence()
},

abortAutoplayCountdown: function (hideToast = false) {
clearTimeout(this.playNextTimeout)
clearInterval(this.playNextCountDownIntervalId)
Expand Down
1 change: 1 addition & 0 deletions src/renderer/views/Watch/Watch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
@set-info-area-sticky="infoAreaSticky = $event"
@scroll-to-info-area="$refs.infoArea.scrollIntoView()"
@save-watched-progress="handleWatchProgressManualSave"
@skip-silence="handleSkipSilence"
/>
<watch-video-chapters
v-if="!hideChapters && !isLoading && videoChapters.length > 0"
Expand Down
5 changes: 5 additions & 0 deletions static/locales/af.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1263,3 +1263,8 @@ KeyboardShortcutPrompt:
Keyboard Shortcuts: Sneltoetse
shortcutLabelSeparator: |
Right-click or hold to see history: Regskliek of hou in om die geskiedenis te sien

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/ar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1121,3 +1121,8 @@ Autoplay Interruption Timer: تم إلغاء التشغيل التلقائي ب
shortcutJoinOperator: +
shortcutLabelSeparator: '|'
KeyboardShortcutTemplate: '{label} ({shortcut})'

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
6 changes: 6 additions & 0 deletions static/locales/as.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ Are you sure you want to open this link?: আপুনি নিশ্চিত
A new blog is now available, {blogTitle}. Click to view more: এতিয়া এটা নতুন ব্লগ
উপলব্ধ, {blogTitle}। অধিক চাবলৈ ক্লিক কৰক
Download From Site: চাইটৰ পৰা ডাউনলোড কৰক


SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/awa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1111,3 +1111,8 @@ KeyboardShortcutPrompt:
Last Chapter: ''
Next Chapter: ''
Skip by Tenths: ''

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/az.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -415,3 +415,8 @@ KeyboardShortcutPrompt:
Fullscreen: Tam ekran göstər
Profile:
Select All: Hamısını seç

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/be.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1125,3 +1125,8 @@ Description:
Collapse Description: Паказаць менш
Right-click or hold to see history: ПКМ або працяглае націсканне, каб праглядзець гісторыю
Autoplay Interruption Timer: Аўтапрайграванне адменена з-за {autoplayInterruptionIntervalHours} гадзін бяздзейнасці

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/bg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1124,3 +1124,8 @@ KeyboardShortcutPrompt:
Skip to Next Video: Преминаване към следващото видео в плейлиста или към следващото препоръчано
Skip to Previous Video: Преминаване към предходното видео в плейлиста
shortcutLabelSeparator: '|'

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/bn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,8 @@ KeyboardShortcutPrompt:
Fullscreen: পূর্ণ-স্ক্রিন
Profile:
Select All: সব নির্বাচন করো

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/br.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1171,3 +1171,8 @@ Keys:
arrowleft: Bir kleiz
arrowright: Bir dehou
arrowup: Bir sevel

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/bs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,8 @@ KeyboardShortcutPrompt:
Preferences: Postavke
Profile:
Select All: Odabri sve

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/ca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -569,3 +569,8 @@ KeyboardShortcutPrompt:
Zoom In: Amplia
Zoom Out: Allunya
Fullscreen: Commuta la pantalla completa

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/ckb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -914,3 +914,8 @@ KeyboardShortcutPrompt:
Toggle Developer Tools: زامنی ئامرازەکانی گەشەپێدەر
checkmark: ✓
shortcutJoinOperator: +

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/cs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1127,3 +1127,8 @@ KeyboardShortcutPrompt:
Skip to Next Video: Přeskočit na další video v playlistu nebo další doporučené video
Skip to Previous Video: Přeskočit na předchozí video v playlistu
shortcutLabelSeparator: |

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/cy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1127,3 +1127,8 @@ Keys:
Right-click or hold to see history: De-gliciwch neu ddal i weld yr hanes
Autoplay Interruption Timer: Diddymwyd awtochwarae oherwydd {autoplayInterruptionIntervalHours} awr o heb ei ddefnyddio
shortcutLabelSeparator: |

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/da.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1296,3 +1296,8 @@ Autoplay Interruption Timer: Autoplay afbrudt på grund af {autoplayInterruption
timers inaktivitet
shortcutLabelSeparator: |
checkmark: ✓

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/de-DE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1123,3 +1123,8 @@ KeyboardShortcutPrompt:
Skip to Next Video: Zum nächsten Video in der Playlist bzw. nächsten empfohlenen Video springen
Skip to Previous Video: Zum vorherigen Video in der Playlist springen
shortcutLabelSeparator: |

SilenceSkip:
Skip Silence: Stille überspringen
Enable Silence Skip: Stille überspringen aktivieren
Disable Silence Skip: Stille überspringen deaktivieren
5 changes: 5 additions & 0 deletions static/locales/el.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1370,3 +1370,8 @@ checkmark: ✓
Display Label: '{label}: {value}'
Yes, Restart: Ναι, Επανεκκίνηση
shortcutLabelSeparator: |

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/en-GB.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1121,3 +1121,8 @@ KeyboardShortcutPrompt:
Home: Seek to the beginning of the video
End: Seek to the end of the video
shortcutLabelSeparator: |

SilenceSkip:
Skip Silence: Skip Silence
Enable Silence Skip: Silence Skip enabled
Disable Silence Skip: Silence Skip disabled
5 changes: 5 additions & 0 deletions static/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1222,3 +1222,8 @@ KeyboardShortcutPrompt:
End: Seek to the end of the video
Skip to Next Video: Skip to the next video in a playlist or next recommended video
Skip to Previous Video: Skip to the previous video in a playlist

SilenceSkip:
Skip Silence: Skip Silence
Copy link
Member

Choose a reason for hiding this comment

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

Please place this with the translation strings for other player buttons.

Enable Silence Skip: Silence Skip enabled
Disable Silence Skip: Silence Skip disabled
5 changes: 5 additions & 0 deletions static/locales/eo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,8 @@ KeyboardShortcutPrompt:
Zoom In: Zomi
Zoom Out: Malzomi
Fullscreen: Baskuli tutekranon

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/es-AR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -685,3 +685,8 @@ KeyboardShortcutPrompt:
Fullscreen: Alternar pantalla completa
Profile:
Select All: Seleccionar todo

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/es-MX.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -879,3 +879,8 @@ KeyboardShortcutPrompt:
Zoom Out: Reducir
Zoom In: Ampliar
Fullscreen: Pantalla completa

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1119,3 +1119,8 @@ KeyboardShortcutPrompt:
Home: Ir al principio del vídeo
End: Ir al final del vídeo
shortcutLabelSeparator: |

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/et.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1123,3 +1123,8 @@ KeyboardShortcutPrompt:
Skip to Next Video: Hüppa esitusloendi järgmise video või järgmise soovituse juurde
Skip to Previous Video: Hüppa esitusloendi eelmise video juurde
shortcutLabelSeparator: |

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
5 changes: 5 additions & 0 deletions static/locales/eu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1125,3 +1125,8 @@ KeyboardShortcutPrompt:
Skip to Next Video: Joan erreprodukzio-zerrendaren hurrengo bideora edo hurrengo gomendatutako bideora
Skip to Previous Video: Joan erreprodukzio-zerrendaren aurreko bideora
shortcutLabelSeparator: |

SilenceSkip:
Skip Silence: ''
Enable Silence Skip: ''
Disable Silence Skip: ''
Loading