diff options
Diffstat (limited to 'web/script/player/track/mod.ts')
-rw-r--r-- | web/script/player/track/mod.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/web/script/player/track/mod.ts b/web/script/player/track/mod.ts new file mode 100644 index 0000000..cdb07cc --- /dev/null +++ b/web/script/player/track/mod.ts @@ -0,0 +1,24 @@ +/* + This file is part of jellything (https://codeberg.org/metamuffin/jellything) + which is licensed under the GNU Affero General Public License (version 3); see /COPYING. + Copyright (C) 2024 metamuffin <metamuffin.org> +*/ +/// <reference lib="dom" /> +import { TimeRange } from "../jhls.d.ts"; +import { OVar } from "../../jshelper/mod.ts"; +import { BufferRange } from "../player.ts"; + +export const TARGET_BUFFER_DURATION = 10 +export const MIN_BUFFER_DURATION = 1 + +export interface AppendRange extends TimeRange { buf: ArrayBuffer, index: number, cb: () => void } + +export abstract class PlayerTrack { + constructor( + public track_index: number, + ) { } + public buffered = new OVar<BufferRange[]>([]); + public abort = new AbortController() + async update(_target: number) { } +} + |