diff options
Diffstat (limited to 'web/script/player/track')
-rw-r--r-- | web/script/player/track/mse.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/web/script/player/track/mse.ts b/web/script/player/track/mse.ts index 5565a6b..237b6f6 100644 --- a/web/script/player/track/mse.ts +++ b/web/script/player/track/mse.ts @@ -9,6 +9,7 @@ import { BufferRange, Player } from "../player.ts"; import { PlayerTrack, AppendRange, TARGET_BUFFER_DURATION, MIN_BUFFER_DURATION } from "./mod.ts"; import { e } from "../../jshelper/src/element.ts"; import { FormatInfo, FragmentIndex, StreamContainer, TrackInfo } from "../types_stream.ts"; +import { show_format } from "../mod.ts"; interface UsableFormat { format_index: number, usable_index: number, format: FormatInfo, container: StreamContainer } @@ -154,8 +155,9 @@ export class MSEPlayerTrack extends PlayerTrack { this.current_load = frag; // TODO why is appending so unreliable?! sometimes it does not add it this.source_buffer.changeType(track_to_content_type(this.active_format.value!.format, this.active_format.value!.container)); + this.source_buffer.timestampOffset = this.active_format.value?.container == "mpeg4" ? frag.start : 0 // this.source_buffer.timestampOffset = this.active_format.value?.format.remux ? 0 : frag.start - this.source_buffer.timestampOffset = 0 + // this.source_buffer.timestampOffset = 0 this.source_buffer.appendBuffer(frag.buf); } } @@ -170,7 +172,8 @@ export class MSEPlayerTrack extends PlayerTrack { e("pre", p ? `mse track ${this.track_index}: format ${p.format_index} (${p.format.remux ? "remux" : "transcode"})` - + `\n\ttype: ${track_to_content_type(p.format, p.container)} br=${p.format.bitrate}` + + `\n\tformat: ${show_format(p.format)}` + + `\n\tbuffer type: ${track_to_content_type(p.format, p.container)}` + `\n\tbuffered: ${rtype("buffered", b)} / queued: ${rtype("queued", b)} / loading: ${rtype("loading", b)}` : "" ) as HTMLElement |