Closed RavikumarTulugu closed 4 months ago
The streaming demo uses the latest version of mp4-muxer
and uses the onData
callback, and it works. Could you check that you're using the library correctly?
Bumping the library's major version (from 3 to 4) means breaking changes can happen and you are expected to adjust your code accordingly. In version 3, the API of StreamTarget
was:
constructor(
onData: (data: Uint8Array, position: number) => void,
onDone?: () => void,
options?: { chunked?: boolean, chunkSize?: number }
);
In version 4, it now is:
constructor(options: {
onData?: (data: Uint8Array, position: number) => void,
chunked?: boolean,
chunkSize?: number
});
Perhaps you forgot to update your usage of StreamTarget
in your code. If you are using TypeScript, then this should show up as a type error in your code.
ok , got it !!! thank you for the reply.
Latest version of mp4 muxer is broken, the onData callback never gets invoked, when the mp4-muxer.js is reverted to a previous version ( commit b295e920d776a3a44cc8a12771f0a3f7a0aed468) , things started working. please check.