Beta Support for Safari on macOS
Safari took us on a wild ride this past year. After Flash support was removed in Safari 14, we were left with no way record video in Safari. The MediaStream Recording API (needed to make recording happen exclusively with HTML & JS) was still disabled by default (under a flag) and experimental.
Luckily Safari 14.0.2 shipped with the experimental MediaStream Recording API turned ON by default. This allowed us to seriously consider supporting Safari on macOS again.
After several months of development & testing, today I am glad to announce that our HTML5 desktop recorder now supports Safari on macOS again.
Since Safari is still considering its MediaStream Recording API implementation experimental, support will be in beta for a while.
Enabling Safari support
To enable recording on Safari with our desktop HTML5 recorder:
- Go to your environment edit dashboard
- Scroll down to the Desktop Recording Clients section
- Click the Safari support checkmark and then
Save environment
Safari support can also be easily turned on when creating a new environment.
Minimum required Safari version
Safari 14.0.2 is the first version of Safari to support the needed video & audio recording API (MediaStream Recording API).
We've tested on Safari 14.0.2, 14.1 and the recently released Safari 15.
Corresponding macOs versions
Safari 14 and 15 are only available on some versions of macOs. As a result you can expect that only users with these macOS versions will be able to use the new recorder.
Mojave macOS 10.14 | Catalina macOS 10.15 | Big Sur macOS 11 | Monterey macOS 12 | |
---|---|---|---|---|
Safari 14 | ✅ | ✅ | ✅ | - |
Safari 15 | - | ✅ | ✅ | ✅ |
Resolutions, codecs and containers on Safari
Safari provides wide support or resolutions similar to Chrome. We were able to capture video streams with resolutions ranging from 240p to 1080p. Camera capabilities still apply. If the requested resolution is not supported, it will default to the nearest supported resolution.
Here's how Safari compares with Chrome and Firefox when testing the FaceTime HD camera on a 2017 15" MacBook PRO using the getUserMedia camera resolution finder.
Tested resolution | Safari 14.1.2 | Chrome 95 | Firefox 93 |
---|---|---|---|
1920x1080 | fail: OverconstrainedError | fail: OverconstrainedError | fail: OverconstrainedError |
1600x1200 | fail: OverconstrainedError | fail: OverconstrainedError | fail: OverconstrainedError |
1280x720 | pass | pass | pass |
800x600 | pass | pass | fail: OverconstrainedError |
640x480 | pass | pass | pass |
640x360 | pass | pass | fail: OverconstrainedError |
352x288 | pass | pass | pass |
320x240 | pass | pass | fail: OverconstrainedError |
176x144 | pass | pass | fail: OverconstrainedError |
160x120 | pass | pass | fail: OverconstrainedError |
We were able to record FullHD (1920x1080) video with an external webcam.
Recording on Safari will encode the video with the trusty H.264 and the audio with AAC . The audio and video will be stored in an MP4 container. As a result, with recordings from Safari, you'll get an .mp4 file for both the raw/source file and the processed file.
Screen recording
Screen recording with Safari on macOS is supported but somewhat limited compared to other browsers as you can only record the entire screen. There's no option to record a specific window or Safari tab.
Here's how screen recording in Safari compares with Chrome and Firefox:
Feature | Chrome | Firefox | Safari |
---|---|---|---|
Record entire screen | yes | yes | yes |
Choose which screen in case of multiple screens | yes | yes | defaults to the screen containing the Safari browser |
Record system audio with entire screen | Windows only | - | - |
Record specific window | yes | yes | - |
Record tab | yes | - | - |
Record tab audio | yes | - | - |
Privacy dialog options and persistence of choices
When you want to record on Safari on macOS, the camera and microphone permission request dialog will appear in the center of the Safari window:
From our testing, the Allow
option ( 1st one in the prompt) is not persistent across page refreshes. Users will be asked for camera/mic access again in the future on the same website. The option is persistent in some cases:
- across multiple recordings made with the same Pipe recorder (to be expected)
- across multiple Pipe recorders on the same page (a 2nd recorder on the page will not ask again for permission)
- across removing and adding Pipe recorders to the page through JS (removing the existing recorder and adding a new one will not result in a permission prompt when the new one tries to access the camera)
The 2nd option Never for This Website
is, as the name incurs, persistent. Resetting a persistent permission involves going to Safari > Preferences > Websites > Camera & Microphone and removing the website/permission.
The Don't Allow
option (3rd one) is also not persistent.
If you don't want to be asked every time to allow access to the camera and microphone, you can click on the red camera icon located on the right of the address bar, and from the dropdown choose Always allow
.
One last note here: with Safari on macOS you don't have to worry about the macOS level prompts for camera and microphone access.
Choosing the camera and microphone
Safari on macOS will default to the integrated FaceTime camera and use the OS level System Preferences setting for the microphone.
At the time of writing, there is no option in Safari 14 or 15 to choose, from multiple cameras or microphones, what camera or microphone to be used by the browser when recording or video calling. Both Chrome and Firefox have such options. This only becomes problematic when you have multiple webcams or microphones.
Microphone
You can choose the microphone at the OS level by going to System Preferences -> Sound -> Input tab. The choice you make here is used by Safari.
A Safari restart may be required if the chosen microphone is not picked up instantly.
Camera
Since our desktop audio & video recorder relies on the browser's camera settings to decide what camera to use, at the moment, your users will not be able to choose their camera when recording with Safari. With MacBook latops, an external USB webcam will be used, when the MacBook is connected to a 2nd screen and the lid is closed (thus deactivating the integrated FaceTime camera).
Known issues
- In some rare cases, the recording process fails to start. When this happens our recorder will show the
Waiting for data..
message followed byDevice error: no audio or video data
. The resulting recording will be empty (0 bytes of data). A macOS restart is needed to clear the problem, a Safari restart will not do. We're still investigating what could cause this, we suspect it has something to do with having a 2nd screen or cam/mic device connected. - On Safari 15, sometimes, the first time you play a recording that you just recorded, it will only play the audio while the screen is either black or stuck on the first video frame. This seems to be a Safari issue and not related directly to Pipe. Playing back the recording in any other player works as expected.
- In some rare cases, recordings during which the computer/device disconnected and connected back to the media server will not play back correctly in the Pipe recorder, they'll only play up to the connection lost moment. The playback issue is isolated to our recorder's playback capabilities. We do get the entire recording and both the resulting source file and the processed .mp4 file playback correctly once downloaded or embedded in a separate player.