Suggestions

close search

Release notes for the OpenTok.js library

API referenceTutorials

Welcome to version 2.13 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.13

New Features in February 2018 — New in OpenTok.js 2.13.2

Bug fixes. This version fixes a number of known issues (see Fixed issues).

New Features in February 2018 — New in OpenTok.js 2.13.1

Bug fixes. This version fixes a number of known issues (see Fixed issues).

New Features in January 2018 — New in OpenTok.js 2.13.0

Publishing from a MediaStreamTrack. You can now publish audio and video using a MediaStreamTrack as the source of the stream's audio or video. When calling OT.initPublisher(), you can specify an audio MediaStreamTrack object as the audioSource or you can specify a video MediaStreamTrack object as the video source. Also, you can call the new OT.getUserMedia() method to get a MediaStream object that uses the microphone and camera as the audio and video source (and you can then obtain the MediaStreamTrack object by calling the getAudioTracks()[0] and getVideoTracks()[0] on the MediaStream object). This feature is not supported in the OpenTok Plugin for Internet Explorer.

Support for stereo audio. You can now publish stereo audio by setting the enableStereo option to true when calling the OT.initPublisher() method.

Getting audio and video statistics for a publisher. You can now get audio and video statistics for a Publisher by calling the getStats() method of the Publisher object. These stats include:

You can use these stats to assess the quality of the publisher's audio-video stream.

H.264 support in Internet Explorer This version adds H.264 support to the OpenTok Plugin for Internet Explorer. This means that clients using the plugin can interoperate with Safari clients (and others) in Safari OpenTok projects.

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.

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.

The audioLevelUpdated event is not working in Safari. In a Safari client, the audioLevel property of an audioLevelUpdated event is always set to 0.

Issue subscribing to your own stream in Internet Explorer. In Internet Explorer, you cannot subscribe to a stream published by your own client.

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.13.2

OpenTok.js unable to work in apps that use RequireJS. This bug was introduced in OpenTok.js 2.13.1. We have fixed this issue.

Getting error "Cannot read property 'id' of undefined" when setting connectionEventsSuppressed to true. This bug was introduced with v2.13.1. We have fixed this issue.

Calling Session.forceDisconnect() was triggering sessionReconnecting events. This bug was introduced with v2.13.0. We have fixed this issue.

Fixed in OpenTok.js 2.13.1

Applications could crash when the OT.initSesison() connectionEventsSuppressed option is set to true. We have fixed this issue.

Screensharing does not work in Electron. We have fixed this issue.

Unable to load OpenTok.js on a page with a content security policy that does not allow unsafe eval. Version 2.13.0 included a dependency that used eval(). We have removed this dependency and fixed this issue.

Fixed in OpenTok.js 2.13.0

Chrome screen-sharing video flickering. This sometimes happened in Safari OpenTok projects. We have fixed this issue.

videoWidth and videoHeight values incorrect for screen-sharing streams. Sometimes when you subscribed to a screensharing stream, the initial values for videoWidth and videoHeight were incorrect. We have fixed this issue.

videoWidth and videoHeight values incorrect in Internet Explorer. When you subscribed to a stream in the OpenTok Plugin for Internet Explorer, the initial values for videoWidth and videoHeight were incorrect. We have fixed this issue.

Unable to turn audio on after muting it in Safari on iOS. After setting subscribeToAudio to false, setting it to true did not work. 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.