Safari now supports WebRTC, and you can now use OpenTok.js apps in Safari 11 for macOS and Safari on iOS 11.
In non-Safari OpenTok projects, Safari clients can use OpenTok, but without video support and with other limitations. See the list of limitations for details.
If you would like to see the OpenTok.js in action in Safari, see our demo.
In order to use OpenTok.js in Safari, follow these steps:
This generates an OpenTok API Key and API secret for your project, with support for Safari. You will need these credentials when developing your application.
If you already have a server component generating your connection credentials, you’ll need to update your server code to use your the Safari project API Key and API Secret. Otherwise you can generate session IDs and tokens manually from your Safari project page or set up an authentication server using the OpenTok server SDKs and your new project credentials.
If you’re building a new OpenTok web application, you can follow the Set up a Basic Web Client Tutorial to build a basic video chat application with OpenTok, then make the same adjustments as above. You can also view the pre-made demo if you would like to see the new functionality without your own application.
The adjustments made above only work in Safari 11 on macOS and in Safari on iOS 11.
Important: A project using the OpenTok.js does not work with older versions of Safari.
Once you’ve installed the supported version, load your application in Safari to test it out. The application will also be compatible with Chrome, Firefox, apps using the OpenTok iOS v2.12 and later, and apps using the OpenTok Android 2.13-beta on reference Android devices (Samsung Galaxy S6, S7 and S8, Huawei Honor 8, and Google Pixel).
The following are limitations in OpenTok Safari projects:
Note: These limitations are due to the lack of support for the VP8 video codec in Safari. WebRTC video in Safari uses the H.264 video codec. If you would like to test video interop between OpenTok Android apps and Safari, you can download the 2.13 beta build of the OpenTok Android SDK.
You can use Safari in non-Safari OpenTok projects, with the following limitations:
Also, keep in mind these issues when developing in Safari (for any OpenTok project):