poly icon indicating copy to clipboard operation
poly copied to clipboard

WebM videos are incompatible with Safari

Open smrohrer opened this issue 3 years ago • 0 comments

Videos in Poly are in the WebM format, which is incompatible with Safari. Since Safari has a significant market share for both mobile and desktop, the more widely compatible mp4 format may be preferable so Poly video functionality can work on as many devices as possible.

Videos are recorded in Poly via the MediaRecorder API, which does not support mp4 and is not supported by Safari. An alternative to MediaRecorder would be to upload video via an <input type="file"/>. On a mobile browser this would give the option to open the camera, but on a desktop browser it would not allow for the inline video recording that we currently have.

If we were to continue using MediaRecorder to record in the browser, but wanted to ensure that videos can be viewed in any browser, we would have to convert them to mp4 using FFmpeg. This article shows how FFmpeg can be run using an AWS Lambda function. Videos could then be recorded in WebM format and then converted to mp4 on AWS as they are uploaded, so they could be delivered in mp4 format viewable on all devices.

smrohrer avatar Aug 16 '20 22:08 smrohrer