aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-04-15 17:56:06 +0200
committermetamuffin <metamuffin@disroot.org>2025-04-15 17:56:06 +0200
commit50dc0e7bea02d7fc5b38edb7f943e19bd8c0285b (patch)
tree809fda62fe17a66d34b3edb7e595f10310bb112e /web
parentc59abb792391e2f7540a80bb8d989021fe0a5b80 (diff)
downloadjellything-50dc0e7bea02d7fc5b38edb7f943e19bd8c0285b.tar
jellything-50dc0e7bea02d7fc5b38edb7f943e19bd8c0285b.tar.bz2
jellything-50dc0e7bea02d7fc5b38edb7f943e19bd8c0285b.tar.zst
remux playback works
Diffstat (limited to 'web')
-rw-r--r--web/script/player/track/mod.ts2
-rw-r--r--web/script/player/track/mse.ts5
2 files changed, 4 insertions, 3 deletions
diff --git a/web/script/player/track/mod.ts b/web/script/player/track/mod.ts
index 5a91209..99b348c 100644
--- a/web/script/player/track/mod.ts
+++ b/web/script/player/track/mod.ts
@@ -8,7 +8,7 @@ import { TimeRange } from "../types_stream.ts";
import { OVar } from "../../jshelper/mod.ts";
import { BufferRange } from "../player.ts";
-export const TARGET_BUFFER_DURATION = 10
+export const TARGET_BUFFER_DURATION = 15
export const MIN_BUFFER_DURATION = 1
export interface AppendRange extends TimeRange { buf: ArrayBuffer, index: number, cb: () => void }
diff --git a/web/script/player/track/mse.ts b/web/script/player/track/mse.ts
index 066bbfd..9fa5e42 100644
--- a/web/script/player/track/mse.ts
+++ b/web/script/player/track/mse.ts
@@ -142,7 +142,7 @@ 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 !== undefined ? frag.start : 0
+ this.source_buffer.timestampOffset = 0 // TODO send if relative PTS //this.active_format.value !== undefined ? frag.start : 0
console.log(`append track ${this.track_index}`);
this.source_buffer.appendBuffer(frag.buf);
}
@@ -151,7 +151,8 @@ export class MSEPlayerTrack extends PlayerTrack {
public debug(): OVar<HTMLElement> {
const rtype = (t: string, b: BufferRange[]) => {
const c = b.filter(r => r.status == t);
- return `${c.length} range${c.length != 1 ? "s" : ""}, ${c.reduce((a, v) => a + v.end - v.start, 0).toFixed(2)}s`
+ // ${c.length} range${c.length != 1 ? "s" : ""}
+ return `${c.reduce((a, v) => a + v.end - v.start, 0).toFixed(2)}s`
}
return this.active_format.liftA2(this.buffered, (p, b) =>
e("pre",