Next JS impossible to play MKV or AVI on Safari?

289 Views Asked by At

I am currently developing a video player in Next JS on web browser, I can play whatever I want on Chrome, I am currently using react-player lib.

But on Safari, MKV or AVI videos cannot be played.

Do you have any work around to make it possible?

A big thank-you.

1

There are 1 best solutions below

0
dsghi On

Safari on the desktop (Mac OS X) supports all media supported by the installed version of QuickTime, including any installed third-party codecs. MKV files are not supported natively on MacOS by default; you must use a modern browser like Chrome with codecs to decode the MKV containers.

Safari on iOS supports low-complexity AAC audio, MP3 audio, AIF audio, WAVE audio, and baseline profile MPEG-4 video.

Generally speaking, if you absolutely need to support Safari, consider using a streaming server that uses something like HLS or can live transcode your media to ensure it can properly playback in your browser or provide media in MPEG-4 (basic profile) and Ogg formats so your media can play in browsers that support HTML5.

Currently, most browsers support low-complexity AAC and MP3 audio and basic profile MPEG-4. Most browsers that do not support these formats support Theora video and Vorbis audio using the Ogg file format.

Safari HTML5 Audio and Video Guide