Suggestions

close search

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

Visit Nexmo

Release notes for the OpenTok.js library

API referenceTutorials

Welcome to version 2.15 of the OpenTok.js library.

If you have any questions, TokBox Support is here to help.


Announcements
New features
Requirements
Known issues
Fixed issues
More information
How to report bugs

For details on the OpenTok.js API, see the OpenTok.js library reference.

Announcements

OpenTok.js now supports Safari 11 on macOS and Safari on iOS 11. For information on video interoperability and other issues, see the Safari browser support page.

As of Firefox 52, an extension (or whitelist listing) is no longer needed for screen sharing. Firefox prompts the end user for access to a screen, window, or application, as it would for access to the camera. For more information, see this Mozilla blog post. (Screen sharing is supported in Chrome with a plug in. It is also supported in the OpenTok plug-in for Internet Explorer.) To support screen sharing Chrome or in older versions of Firefox, see the OpenTok screensharing-extensions repo on GitHub.

New Features in OpenTok.js 2.15

New Features in OpenTok.js 2.15.4

This release fixes some issues — see the list of fixed issues.

New Features in OpenTok.js 2.15.3

This release fixes an issue with logging to the console — see the list of fixed issues.

New Features in OpenTok.js 2.15.2

This release fixes some issues — see the list of fixed issues.

New Features in OpenTok.js 2.15.1

This release fixes some issues — see the list of fixed issues.

New Features in OpenTok.js 2.15.0

The ability to dynamically change the audio source for a publisher. See the Publisher.setAudioSource() and Publisher.getAudioSource() methods.

The ability to get a list of supported video codecs in the client's browser. See the OT.getSupportedCodecs() method.

Event when a subscriber's video resumes when the codec changes to one supported in the subscriber's browser. See the Subscriber videoEnabled event.

Screensharing without extensions in Chrome. Chrome 70 allows screen sharing without an extension, using the MediaStream.getDisplayMedia() method. Chrome asks the user to grant the page permission to share the screen. In Chrome 70, go to chrome://flags and select the "Enable Experimental Web Platform Features" flag. We anticipate that this feature will be enabled in future stable versions of Chrome (and Opera). With this setting enabled, calling OT.checkScreenSharingCapability() results in supported being set to true and extensionRequired being undefined.

IP white list setting for enterprise partners. Enterprise partners that have IP white listing enabled for an OpenTok project should set the new ipWhitelist property of the options parameter of OT.initSession() to true when instantiating a Session object.

Also see the list of fixed issues.

Features added in previous versions

Show details.

Requirements

The OpenTok.js library is currently supported in:

The OpenTok.js library uses port 443. Port 443 must be open on the client network.

Known issues

The following are known issues for this version of OpenTok.js:

If you call publishAudio(false) in a routed session, clients using Chrome 65 fail to subscribe. We are working on a fix for this issue.

Publisher audio level meter and audioLevelUpdated events not working in Chrome 66. See this Chromium bug report.

The OpenTok Automatic Reconnection feature does not work in Firefox or Internet Explorer. Firefox has a known issue with offline mode and peer connections (see this Mozilla bug), which Mozilla is working on.

One Publisher in the OpenTok Plugin for Internet Explorer. You can only add one Publisher (within all browser windows and tabs).

Cannot hide a Publisher in the OpenTok Plugin for Internet Explorer. Attempting to hide the a Publisher (by setting style.display to "none" or by setting visibility to "hidden") can cause the publisher to fail. As a workaround, you can set the width and height of the publisher to 2 or more pixels each; make sure that the publisher is in the DOM; and then when the Publisher object dispatches the streamCreated event, set the visibility to "hidden".

Safari clients sometimes cannot subscribe to streams published in Firefox. If the Safari client is not first publishing a stream, it cannot subscribe to a stream published by a client using Firefox. This is due to a known issue in Safari.

Setting the frame rate does not work in Firefox on macOS when using the built-in FaceTime camera. Setting the frameRate option when calling OT.initPublisher() has no effect. This is the Mozilla bug report for the issue.

Setting the audio bitrate is not supported in streams published in Firefox. Setting the audioBitrate option of the OT.initPublisher() method has no effect in Firefox.

Setting the frame rate does not work in the OpenTok Plugin for Internet Explorer. Setting the frameRate option when calling OT.initPublisher() has no effect.

Issues setting video source for a Publisher in Firefox. In an page loaded via HTTPS, if the user clicks "Always Share" when granting access to the camera, you can only use that camera. You cannot set the video source to another camera.

The OpenTok plugin for Internet Explorer does not work in sandboxed iframes. This is an intentional limitation of the browser. The browser blocks plugin content inside a sandboxed frame.

WebRTC is a peer-to-peer protocol, and it is possible that connections will fail to connect. The most common cause for failure is a firewall that the protocol cannot traverse. When OpenTok detects this failure, the OT object dispatches an exception event object, with the code property set to 1013.

In Chrome, publishing is not supported on http (insecure) pages (except for http://localhost). You must serve the page over https (secure). Note that for testing, you can also load a page from the local file system (from the file: URI scheme).

Chrome on Android fails to subscribe to videos in Safari projects. This only occurs in routed OpenTok sessions (sessions that use the OpenTok Media Router). OpenTok.js v2.13 fixes this issue in relayed sessions. See this Chromium bug report.

Fixed in OpenTok.js 2.15

Fixed in OpenTok.js 2.15.4

New autoplay policy in Chrome 71. Chrome 71 introduces a new autoplay policy that is similar to the one in Safari. This patch brings the same autoplay behavior that we have in Safari to Chrome. The result is that if you subscribe to a stream and you are not publishing, Chrome requires some user interaction for the subscriber audio to start playing. This patch adds a muted icon that appears over the Subscriber video. When the user clicks this icon, the subscrber audio starts the playback.

accessDialogClosed is not working. We have fixed this issue.

Cannot read property 'sampleQos' of undefined error when using Chrome mobile. We have fixed this issue.

Fixed in OpenTok.js 2.15.3

Warnings and errors not being logged to the console by default. We have fixed this issue.

Fixed in OpenTok.js 2.15.2

Subscriber not being cleaned up on 'streamDestroyed' Event. We have fixed this issue.

OPENTOK banner in the console. We have made the OPENTOK banner only display in the console when logLevel is set to OT.DEBUG.

Fixed in OpenTok.js 2.15.1

TypeScript definition corrections. This version fixes some OpenTok.js TypeScript definitions.

The OpenTok plugin for Internet Explorer was loading over HTTP, not HTTPS. We have fixed this issue.

Fixed in OpenTok.js 2.15.0

Failure to publish after opening a tab a second time in Safari. We have fixed this issue.

The publisher audio level indicator does not work after you call Publisher.cycleVideo() in Safari on iOS. We have fixed this issue.

Issue with camera access permissions in the OpenTok plugin. We have fixed this issue.

Fixed in previous versions

Show details.

More information

See the reference documentation for the OpenTok.js library.

To see sample code and to read more information on using the OpenTok.js library, see the OpenTok Tutorials and Examples page.

For documentation on the OpenTok server-side libraries, see the OpenTok server-side libraries page.

Also check out the OpenTok Help Center.

How to report bugs

We'd love to hear from you! If you have any issues or bugs, you can report them to us at support@tokbox.com.