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

Allow uploads from iOS via the camera roll #14

Closed
robby1066 opened this issue Jan 19, 2021 · 2 comments
Closed

Allow uploads from iOS via the camera roll #14

robby1066 opened this issue Jan 19, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request message creation Items that relate to the creation and recording of messages
Milestone

Comments

@robby1066
Copy link
Owner

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 attribute

the accepts attribute

The capture attribute specifies that, optionally, a new file should be captured, and which device should be used to capture that new media of a type defined by the accept attribute.

Description 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.

@robby1066 robby1066 self-assigned this Jan 19, 2021
@robby1066 robby1066 added this to the For January milestone Jan 19, 2021
@robby1066 robby1066 added enhancement New feature or request working on it This issue is actively being worked on labels Jan 19, 2021
@robby1066
Copy link
Owner Author

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.

@robby1066
Copy link
Owner Author

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!

@robby1066 robby1066 added message creation Items that relate to the creation and recording of messages and removed working on it This issue is actively being worked on labels Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request message creation Items that relate to the creation and recording of messages
Projects
None yet
Development

No branches or pull requests

1 participant