aboutsummaryrefslogtreecommitdiff
path: root/web/script/player/profiles.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-02-11 14:38:03 +0100
committermetamuffin <metamuffin@disroot.org>2025-02-11 14:38:03 +0100
commit545164925f3d724b9313f8e871dbb444fc016168 (patch)
treeefea90a939e217d2bf7ef6093f7b810a77bab9c7 /web/script/player/profiles.ts
parentffe3e9cca5341ff102ac2211e165b908e068be15 (diff)
downloadjellything-545164925f3d724b9313f8e871dbb444fc016168.tar
jellything-545164925f3d724b9313f8e871dbb444fc016168.tar.bz2
jellything-545164925f3d724b9313f8e871dbb444fc016168.tar.zst
Disable tracks that cant be played
Diffstat (limited to 'web/script/player/profiles.ts')
-rw-r--r--web/script/player/profiles.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/script/player/profiles.ts b/web/script/player/profiles.ts
index 5402721..3344ef6 100644
--- a/web/script/player/profiles.ts
+++ b/web/script/player/profiles.ts
@@ -40,7 +40,10 @@ export class ProfileSelector {
if (!this.is_init) await this.init(), this.is_init = true;
const sup_remux = await this.remux_supported(track);
- if (!sup_remux && !this.profiles.length) return this.player.logger?.log("None of the available codecs are supported. The Media can't be played back.")
+ if (!sup_remux && !this.profiles.length) {
+ this.player.logger?.log("None of the available codecs are supported. This track can't be played back.")
+ return false
+ }
const min_prof = sup_remux ? -1 : 0
const co = profile.value?.order ?? min_prof
// TODO use actual bitrate as a fallback. the server should supply it.
@@ -60,6 +63,7 @@ export class ProfileSelector {
}
// profile.value = profs[0]
+ return true
}
log_change(track: number, p: EncodingProfileExt | undefined) {