close search

Add Messaging, Voice, and Authentication to your apps with Nexmo APIs

Visit Nexmo

Safari Browser Support

Safari now supports WebRTC, and you can now use OpenTok.js apps in Safari 11 for macOS and Safari on iOS 11.

In a routed session (a session that uses the OpenTok Media Router) in an OpenTok project that has the preferred video codec set to VP8 (not H.264), Safari clients can use OpenTok but without video support and with other limitations. See the list of limitations for details.

For more information on video codec support, see this developer guide.

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:

Additional resources:

Step 1: Setting the preferred codec for your OpenTok project

  1. Log into your TokBox Account page.
  2. In the top of the page, click the Create Project button.
  3. Set the Preferred video codec to H.264.

Step 2: Setting up your application to work in Safari

  1. Be sure your code loads v2.12 or later of OpenTok.js. Note that loading the following script loads the latest version of OpenTok.js v2:
  2. If your application uses routed sessions (sessions that use the OpenTok Media Router), ensure that all OpenTok session IDs and tokens being used in your application are generated from a project that has the preferred codec set to H.264.

    If you already have a server component generating your connection credentials, you’ll need to update your server code to use your the correct project API Key and API Secret. Otherwise you can generate session IDs and tokens manually from the 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.

Step 3: Testing your application with Safari

The adjustments made above only work in Safari 11 on macOS and in Safari on iOS 11.

Important: A project using 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, Edge, the OpenTok Plugin for Internet Explorer (using OpenTok.js 2.13 or later), apps using the OpenTok iOS v2.12 and later, apps using OpenTok Android 2.13+ on most Android devices (see OpenTok codec coverage), and apps using OpenTok Windows 2.13+.


View the OpenTok Safari demo


The following are limitations in OpenTok running in Safari:

You can use Safari in OpenTok projects with the preferred codec set to VP8, with the following limitations:

Also, keep in mind these issues when developing in Safari (for any OpenTok project):