diff options
Diffstat (limited to 'web/script/player')
-rw-r--r-- | web/script/player/profiles.ts | 4 | ||||
-rw-r--r-- | web/script/player/track.ts | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/web/script/player/profiles.ts b/web/script/player/profiles.ts index 726e4ba..fe0e64d 100644 --- a/web/script/player/profiles.ts +++ b/web/script/player/profiles.ts @@ -8,7 +8,7 @@ import { OVar } from "../jshelper/mod.ts"; import { EncodingProfile } from "./jhls.d.ts"; import { profile_to_partial_track, test_media_capability } from "./mediacaps.ts"; import { Player } from "./player.ts"; -import { PlayerTrack } from "./track.ts"; +import { MSEPlayerTrack } from "./track.ts"; const PROFILE_UP_FAC = 0.6 const PROFILE_DOWN_FAC = 0.8 @@ -20,7 +20,7 @@ export class ProfileSelector { constructor( private player: Player, - private track: PlayerTrack, + private track: MSEPlayerTrack, private bandwidth: OVar<number> ) { } diff --git a/web/script/player/track.ts b/web/script/player/track.ts index 75ffdca..b6a280f 100644 --- a/web/script/player/track.ts +++ b/web/script/player/track.ts @@ -62,7 +62,9 @@ export class VttPlayerTrack extends PlayerTrack { super(track_index) this.track = this.player.video.addTextTrack("subtitles", metadata.name, metadata.language) for (const cue of cues) { - this.track.addCue(new VTTCue(cue.start, cue.end, cue.content)) + const c = new VTTCue(cue.start, cue.end, cue.content); + c.line = -2; + this.track.addCue(c) } this.track.mode = "showing" this.abort.signal.addEventListener("abort", () => { |