videojs-record: Can't record video in Safari
Safari 11 added getUserMedia Support in Sept 2017, more details here: https://webkit.org/blog/7763/a-closer-look-into-webrtc/
When looking at the demo page:
https://collab-project.github.io/videojs-record/examples/audio-video.html
I initialise the camera, click record and camera starts recording. I click stop and it stops recording but no playback button appears.
Plays back fine in Chrome on the same device.
Get following console error:
GetRecorderType is not a constructor (evaluating 'new Recorder (mediaStream, config)
from RecordRTC.j:87
versions
videojs
videojs version : 6.2.8 videojs-record version : 2.0.0
browsers
Safari v11
OSes
Mac OS 10.12.6
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 37 (17 by maintainers)
Commits related to this issue
- bump required version for recordrtc to 5.4.5 for improved Safari 11 support (#181) — committed to collab-project/videojs-record by thijstriemstra 7 years ago
videojs-record relies on RecordRTC which relies mainly on the
MediaRecorderobject from the MediaStream Recorder API to record video.Safari 11 and 12 do not support the MediaStream Recorder API.
There is a bug report filled thus if you want native video recording in Safari you can help by commenting on it and explaining your use case.
Recently the bug’s status changed to “under consideration” so there is a slight chance we will see the feature in Safari 13 next year.
This bug report on bugs.webkit.org tracks the MediaRecorder implementation in WebKit and thus Safari.
I encourage everyone to show their interest and add a comment describing how a MediaRecorder implementation would help their project/development. Creating an account takes a second.
Also, WebKit is an open source project so one can also contribute code towards implementing the MediaRecorder API.
No. If there was I would consider it a security issue in Safari.
Safari team is either understaffed, incompetent or scared of shipping new features, I don’t know. I do know it’s a shit browser.
Good news! They’ve started implementing it in Webkit (which Safari uses): https://trac.webkit.org/changeset/237106/webkit/ and https://trac.webkit.org/changeset/239145/webkit/
Also mentioned here: https://webkit.org/blog/8475/release-notes-for-safari-technology-preview-68/
@THEozmic I was using BrowserStack and their tools.
Thanks for all the valuable feedback. To summarize:
So Safari can not be supported right now.
Final results on this for now. I managed to record frames using canvas but not assembling them on the client as Safari doesn’t support webm, even if that would be possible with webworker then it would be slow on the client at 25 fps. Sending the frames over to the server for assembly is possible but png frames are very large even if you would send them as binaries with web sockets every second or so. I’ve now researched locally recording a WebRTC stream on Safari quite a bit and there seems not to be any practical solutions yet. Please if anybody has any suggestions please let me know.
In the meantime, I’m working on implementing a recording solution using Kurento where the video is recorded on the server side through a live WebRTC stream. I’m still considering if I should use this solution for all browsers or just for Safari.
@rbjarnason I unfortunately do not have access to an iphone to test. If you can send me a fairly recent one I’ll surely be able to fix all outstanding iOS bugs.
Regarding those play errors, could it be that we’re hitting auto-play policy issues? https://webkit.org/blog/7734/auto-play-policy-changes-for-macos/