From 079fbf62ad125cfe69853c0bf543db7225d41020 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 16 Feb 2025 15:15:20 +0100 Subject: dont leak media paths, fix jsp profile selection and add small hack to accept relative timestamps from transcoding --- web/script/player/profiles.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web/script/player/profiles.ts') 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 @@ */ /// 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 }) } -- cgit v1.2.3-70-g09d2