samirkumardas / jmuxer

jMuxer - a simple javascript mp4 muxer that works in both browser and node environment.
Other
548 stars 108 forks source link

Pass MediaSource object to onReady callback #149

Open etenoch opened 1 month ago

etenoch commented 1 month ago

We're working on an issue with live streams in safari. The issue seems to be this buffer underflow due to network conditions causing safari to pause automatically: https://stackoverflow.com/questions/74461792/mediasource-api-safari-pauses-video-on-buffer-underflow

Using a locally edited version of jmuxer, if we add this mediaSource override mediaSource.duration = Number.POSITIVE_INFINITY;, our live stream works properly in safari.

We want to surface the mediaSource object via onReady so we can perform this override in our client code.

Also ran build and pro to update jmuxer.js and jmuxer.min.js.