samirkumardas / jmuxer

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

Question: Mobile Safari MediaSource undefined? #129

Closed jcalabro closed 1 year ago

jcalabro commented 1 year ago

Hi there, hope you're doing well. Thanks for an awesome project! I had a question that came up that I couldn't find the answer to, and I was hoping you might have an insight?

I'm using jmuxer on desktop browsers and some mobile browers (i.e. Android Chrome) and it's working great. However, it's not working on iPad/iOS Safari or Chrome because the browser does not support the MediaSource API.

However, according to MDN and caniuse, it should be supported (I'm running the latest iOS and iPad OS). Have you noticed this before? Am I missing something? If no no worries, I can do some digging.

Thanks!

jcalabro commented 1 year ago

Hi again, I figured out a workaround to my issue.

Apparently, the MedaiSource API constructor is not loaded if you open a window with target="_blank". However, it always does if you refresh the page. Just put a quick auto-refresh on the page for my user if the constructor is undefined.

Thanks again for an awesome library!