diff options
author | metamuffin <metamuffin@disroot.org> | 2025-02-16 15:15:20 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-02-16 15:15:20 +0100 |
commit | 079fbf62ad125cfe69853c0bf543db7225d41020 (patch) | |
tree | 1445daa006936ad83edef1b217f05a9dc43e33bc /web/script/player/profiles.ts | |
parent | abe663807337faa717f9485b047c8f0e808f2a09 (diff) | |
download | jellything-079fbf62ad125cfe69853c0bf543db7225d41020.tar jellything-079fbf62ad125cfe69853c0bf543db7225d41020.tar.bz2 jellything-079fbf62ad125cfe69853c0bf543db7225d41020.tar.zst |
dont leak media paths, fix jsp profile selection and add small hack to accept relative timestamps from transcoding
Diffstat (limited to 'web/script/player/profiles.ts')
-rw-r--r-- | web/script/player/profiles.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/web/script/player/profiles.ts b/web/script/player/profiles.ts index 3344ef6..5ebdeb4 100644 --- a/web/script/player/profiles.ts +++ b/web/script/player/profiles.ts @@ -5,7 +5,8 @@ */ /// <reference lib="dom" /> import { OVar } from "../jshelper/mod.ts"; -import { EncodingProfile } from "./jhls.d.ts"; +import { EncodingProfile, SourceTrackKind } from "./jhls.d.ts"; +import { get_track_kind } from "./mediacaps.ts"; import { profile_to_partial_track, test_media_capability } from "./mediacaps.ts"; import { Player } from "./player.ts"; import { MSEPlayerTrack } from "./track/mse.ts"; @@ -27,6 +28,8 @@ export class ProfileSelector { async init() { for (let id = 0; id < this.track.index!.extra_profiles.length; id++) { const p = this.track.index!.extra_profiles[id]; + // TODO hacky type casting solution + if (get_track_kind(this.track.metadata.kind) != get_track_kind(p as unknown as SourceTrackKind)) continue if (!await test_media_capability(profile_to_partial_track(p))) continue this.profiles.push({ id, order: 0, ...p }) } |