mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 11:23:45 +02:00
[WIP] Add majority of logic for HLS reading support
This commit is contained in:
@@ -267,6 +267,10 @@ class Mp3AudioTrackBacking implements InputAudioTrackBacking {
|
||||
};
|
||||
}
|
||||
|
||||
getVariant() {
|
||||
return null;
|
||||
}
|
||||
|
||||
async getDecoderConfig(): Promise<AudioDecoderConfig> {
|
||||
assert(this.demuxer.firstFrameHeader);
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ export const readNextMp3FrameHeader = async (reader: Reader, startPos: number, u
|
||||
} | null> => {
|
||||
let currentPos = startPos;
|
||||
|
||||
// todo optimize this shit wtf is this
|
||||
|
||||
while (until === null || currentPos < until) {
|
||||
let slice = reader.requestSlice(currentPos, FRAME_HEADER_SIZE);
|
||||
if (slice instanceof Promise) slice = await slice;
|
||||
|
||||
Reference in New Issue
Block a user