Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0fd7535
Local API: Implement SABR for VODs
PikachuEXE Sep 17, 2025
46d7e61
* Allow max 3 player reloads for the same video before fallback to ol…
PikachuEXE Sep 18, 2025
7e19728
! Fix data type for `playerTimeMs` (googlevideo 4.0.4)
PikachuEXE Sep 18, 2025
d705292
* Update player reload handling to restart player at the current time…
PikachuEXE Sep 18, 2025
69e9500
* Do not count reload if player is loaded after that
PikachuEXE Sep 18, 2025
efa5920
! Fix access from nullable object
PikachuEXE Sep 19, 2025
c4784ee
* Remove code for debug only
PikachuEXE Sep 19, 2025
3d1d4f0
Merge branch 'development' into sabr-pr
PikachuEXE Sep 22, 2025
af51633
! Workaround infinite backoff (mostly at the middle of playback
PikachuEXE Sep 19, 2025
a330d08
! Workaround infinite retry due to nextRequestPolicy (mostly at the m…
PikachuEXE Sep 20, 2025
9efea08
Merge branch 'development' into sabr-pr
PikachuEXE Sep 23, 2025
59f6736
! Fix no audio track selection when SABR used
PikachuEXE Sep 22, 2025
ef6aa70
! Fix no audio track selection when SABR used with less requests
PikachuEXE Sep 23, 2025
5ff45f1
Merge branch 'development' into sabr-pr
PikachuEXE Sep 30, 2025
f762f82
* Use Math.round instead of Math.trunc for start time / duration like…
PikachuEXE Sep 25, 2025
29149af
* Add requestNumber to SABR URL
PikachuEXE Sep 26, 2025
503add9
! Fix SABR redirect handling
PikachuEXE Sep 26, 2025
b9ace0a
! Fix reload sometimes not working
PikachuEXE Sep 28, 2025
6c1a494
* Reload with less cumulative backoff requested (5 > 3)
PikachuEXE Sep 30, 2025
c97b44f
* Implement poToken fallback (visitorData bind > videoID bind
PikachuEXE Sep 30, 2025
42e9b08
! Fix progress saving run for video reloading in the middle
PikachuEXE Sep 30, 2025
e249209
* Implement proper poToken selection
PikachuEXE Oct 7, 2025
8f4440e
Merge branch 'development' into sabr-pr
PikachuEXE Oct 7, 2025
dda5e57
- Remove accidentially introduced debug code
PikachuEXE Oct 8, 2025
40b22d3
* skip the call to concatenateChunks if it isn't needed
PikachuEXE Oct 8, 2025
ae16807
* Make changes for VS Code
PikachuEXE Oct 8, 2025
acb649c
* Update new toast messaages to be translatable
PikachuEXE Oct 9, 2025
08f2c32
Merge branch 'development' into sabr-pr
PikachuEXE Oct 11, 2025
ec7f2f6
no message
PikachuEXE Oct 13, 2025
478278d
Merge branch 'development' into sabr-pr
PikachuEXE Oct 14, 2025
1427001
* Enable SABR by default
efb4f5ff-1298-471a-8973-3d47447115dc Oct 13, 2025
f476697
Merge branch 'development' into sabr-pr
PikachuEXE Oct 16, 2025
ae4cbe1
Merge branch 'development' into sabr-pr
PikachuEXE Oct 18, 2025
0bfd42e
* Load less data when requesting video data
PikachuEXE Oct 16, 2025
fa14be7
! Workaround player stuck at the end on windows
PikachuEXE Oct 16, 2025
7f884da
! Fix null endSegmentIndex handling
PikachuEXE Oct 14, 2025
05b15d6
~ Update comment about workaround
PikachuEXE Oct 18, 2025
6dbba0c
! Fix player stuck at the end of video with shortest duration
PikachuEXE Oct 20, 2025
adba34b
Merge branch 'development' into sabr-pr
PikachuEXE Oct 21, 2025
ce9d37d
Merge branch 'development' into sabr-pr
PikachuEXE Oct 30, 2025
2d22a9a
Merge branch 'development' into sabr-pr
PikachuEXE Nov 3, 2025
8afec6e
Merge branch 'development' into sabr-pr
PikachuEXE Nov 4, 2025
e71d486
! Avoid using `player` when it's null (on reload)
PikachuEXE Nov 4, 2025
3d66e47
Merge branch 'development' into sabr-pr
PikachuEXE Nov 6, 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
5 changes: 3 additions & 2 deletions _scripts/webpack.web.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const config = {
filename: '[name].js',
},
externals: {
'youtubei.js': '{}'
'youtubei.js': '{}',
googlevideo: '{}'
},
module: {
rules: [
Expand Down Expand Up @@ -137,7 +138,7 @@ const config = {
'process.env.SWIPER_VERSION': `'${swiperVersion}'`
}),
new webpack.ProvidePlugin({
process: 'process/browser'
process: 'process/browser.js'
}),
new HtmlWebpackPlugin({
excludeChunks: ['processTaskWorker'],
Expand Down
2 changes: 2 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"target": 3.5
},
"compilerOptions": {
"module": "esnext",
"moduleResolution": "bundler",
"strictNullChecks": true,
"baseUrl": "./",
"paths": {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"autolinker": "^4.1.5",
"bgutils-js": "^3.2.0",
"electron-context-menu": "^4.1.1",
"googlevideo": "^4.0.4",
"marked": "^16.4.1",
"process": "^0.11.10",
"shaka-player": "^4.16.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
@change="handleRestartPrompt"
/>
</FtFlexBox>
<FtFlexBox v-if="sabrAllowedOnPlatform">
<FtToggleSwitch
tooltip-position="top"
:label="'Enable SABR as DASH backend'"
compact
:default-value="sabrEnabled"
:tooltip="'Experimental and often has backoff time at the start of video playback. But a good alternative backend to try when default DASH backend failed.'"
@change="updateSabrEnabled"
/>
</FtFlexBox>
<FtPrompt
v-if="showRestartPrompt"
:label="$t('Settings[\'The app needs to restart for changes to take effect. Restart and apply change?\']')"
Expand All @@ -27,13 +37,15 @@
</template>

<script setup>
import { onMounted, ref } from 'vue'
import { computed, onMounted, ref } from 'vue'
import FtSettingsSection from '../FtSettingsSection/FtSettingsSection.vue'
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
import FtToggleSwitch from '../FtToggleSwitch/FtToggleSwitch.vue'
import FtPrompt from '../FtPrompt/FtPrompt.vue'
import store from '../../store/index'
const replaceHttpCacheLoading = ref(true)
const replaceHttpCache = ref(false)
const showRestartPrompt = ref(false)
Expand Down Expand Up @@ -69,6 +81,18 @@ function handleReplaceHttpCache(value) {
window.ftElectron.toggleReplaceHttpCache()
}
}
const sabrAllowedOnPlatform = process.env.SUPPORTS_LOCAL_API
/** @type {import('vue').ComputedRef<boolean>} */
const sabrEnabled = process.env.SUPPORTS_LOCAL_API ? computed(() => store.getters.getSabrEnabled) : false
/**
* @param {boolean} value
*/
function updateSabrEnabled(value) {
store.dispatch('updateSabrEnabled', value)
}
</script>

<style scoped src="./ExperimentalSettings.css" />
Loading