Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross browser audio/video recording not supported on various browsers #124

Open
dasrajanbvi opened this issue Apr 15, 2023 · 2 comments
Open

Comments

@dasrajanbvi
Copy link

When i record media from Chrome it's not supported on safari, similarly we tried the same cases with different browsers with various combination of devices. please find below table for reference and summarised report.

Screenshot 2023-04-15 at 1 44 12 PM

we even tried to download the file and play it on different devices and browsers but it causes the same problem.
for the recording to save we are using s3 bucket.
We have tried different types of mimetype on mediaRecorderOptions but it wasn't still working.
Do you have any solution which is not dependent on platform specific? as we require media recorder to work on all browsers and devices.

@MartinoCimarosti
Copy link

Use mimeType: "video/mp4;codecs=avc1" for safari, add some logic that detects the browser and switches between video/webm;codec=h246 (for chrome/firefox) and "video/mp4;codecs=avc1" for safari.

@jasondainter
Copy link

Note that chrome on IOS mobile devices are actually "safari" since they're based on Safari (not chromium). Makes this somewhat confusing when doing mobile testing but knowing that fact helped me a lot!

Ive found that the mime type used to record video needs to be different to the type to play back video also to ensure maximum compatibility if using mobile (desktop browsers are a bit more forgiving) this was quite helpful https://stackoverflow.com/questions/76124559/javascript-mediarecorder-video-format-compatibility-between-different-browsers

Ultimately it's a pain in the ass, but using Cloudinary to instantly rewrite the URLS (which automatically transcodes them on the fly) has been fruitful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants