Closed robby1066 closed 3 years ago
Uploading a video via iOS and a normal HTML file input with capture
and accept
attributes correctly configured works well, except the duration of the video is not captured by the submission. This causes the table of contents to completely break and not be displayed.
A possible workaround here (which may have benefits in other places) is to install FFMpeg on the server and attempt to analyze the video upon upload. FFmpeg has had some issues with videos recorded through the browser, as the proper duration metadata is not sent along with the video stream. This is a patchwork approach (capturing duration via javascript everywhere except iOS, then using ffmpeg on the server for iOS), but it could provide decent coverage.
After installing FFMpeg, durations appear to be correctly captured from uploaded iOS videos. A test on desktop, android, and iOS correctly rendered the table of contents. Calling this one complete!
Area affected
Message creation
What's the problem
Mobile Safari doesn't support the APIs needed to record directly through the browser. But there is potentially another way to support iOS, using two attributes on a normal html file upload control.
the
capture
attributethe
accepts
attributeDescription of feature
The new feature would add an alternate input that would be available to browsers than cannot use the browser-based apis to capture video from the web cam.
Alternatives and workarounds
Right now mobile safari users cannot record videos for keep posted from their iOS devices. They have to use a desktop computer with a supported browser.