mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-10 09:13:47 +02:00
A BUNCH of HLS (and related) progress
- Add support for fMP4 segments - Add initInput (supported by ISOBMFF and MPEG-TS) - Input.isSupported() - Refactored file size retrieval logic, the file size can now be retrieved alongside the first read. - Add support for unsized UrlSources - Add support for multiple trun boxes in a row for the same track (as the spec literally says lol) - Add support for more M3U8 features - Fix faulty line reader - MPEG-TS improvements: support video parameters not in first packet, support better key frame detection, support extension PES packets without PTS - Fix reorder buffer being 1 element too small
This commit is contained in:
@@ -92,16 +92,16 @@ const initMediaPlayer = async (resource: File | string) => {
|
||||
warningElement.textContent = '';
|
||||
|
||||
let input: Input;
|
||||
if (typeof resource === 'string' && resource.endsWith('.m3u8')) {
|
||||
if (typeof resource === 'string' && resource.includes('.m3u8')) {
|
||||
const manifestInput = new ManifestInput({
|
||||
entryPath: resource,
|
||||
getSource: path => new UrlSource(path),
|
||||
manifestFormats: ALL_MANIFEST_FORMATS,
|
||||
mediaFormats: ALL_FORMATS,
|
||||
});
|
||||
const variant = (await manifestInput.getVariants())[0]!;
|
||||
// const variant = (await manifestInput.getVariants())[0]!;
|
||||
|
||||
input = variant.toInput();// await manifestInput.toInput();
|
||||
input = await manifestInput.toInput();
|
||||
|
||||
// https://test-streams.mux.dev/test_001/stream.m3u8
|
||||
// https://test-streams.mux.dev/test_001/stream_1000k_48k_640x360_050.ts
|
||||
|
||||
Reference in New Issue
Block a user