From 05fccc2ae8deb439399f0be3acb97ce33ebb5301 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 23 May 2023 15:15:53 -0700 Subject: [PATCH] Fix decoding. --- web/src/player/decoder.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/player/decoder.ts b/web/src/player/decoder.ts index b6df5ea..bec4bad 100644 --- a/web/src/player/decoder.ts +++ b/web/src/player/decoder.ts @@ -29,14 +29,14 @@ export default class Decoder { async receiveSegment(msg: Message.Segment) { // Wait for the init segment to be fully received and parsed - const init = await this.init.info + await this.init.info const input = MP4.New() input.onSamples = this.onSamples.bind(this) - input.onReady = (track: any) => { + input.onReady = (info: MP4.Info) => { // Extract all of the tracks, because we don't know if it's audio or video. - for (const i of init.tracks) { - input.setExtractionOptions(track.id, i, { nbSamples: 1 }) + for (const track of info.tracks) { + input.setExtractionOptions(track.id, track, { nbSamples: 1 }) } input.start()