Suggestions

close search

Add Messaging, Voice, and Authentication to your apps with Vonage Communications APIs

Visit the Vonage API Developer Portal

Release notes for the OpenTok.js library

Welcome to version 2.28.0 of the OpenTok.js library.

If you have any questions, Vonage 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

Safari versions 15.4 and 15.5 (which ship with iOS 15.4 and 15.5 and macOS 12.3 and 12.4) fix issues that affect apps that use OpenTok.js (in Safari). See this note.

OpenTok.js now includes beta support for Google Chrome for iOS and Firefox for iOS.

OpenTok.js version 2.16 was the last version to support the OpenTok Plugin for Internet Explorer. OpenTok.js version 2.16 was deprecated in May 2020 for the Standard environment and June 2020 for the Enterprise environment. Support for the OpenTok plugin for Internet Explorer was removed in OpenTok 2.17.

OpenTok.js fully supports Chromium-based versions of Microsoft Edge (versions 79+) for Windows and macOS.

Safari now supports the VP8 video codec, in addition to H.264. VP8 support is in Safari 12.1, which ships on macOS 10.14.4 and is also available for macOS 10.13.6 and 10.12.6. And it is available in the latest iOS 12.2 release. For information on video interoperability and other issues, see the Safari browser support page. For more information on video codecs, see this developer guide.

As of Chrome 72 and Opera 59, an extension is no longer needed for screen sharing. Chrome prompts the end user for access to a screen, window, or tab, as it would for access to the camera. In the current versions of Chrome, Firefox, and Opera, you no longer need to deploy a screen-sharing extension.

On macOS 10.15+ (Catalina), to publish a screen-sharing stream the user must grant the browser access to the screen in macOS System Preferences > Security & Privacy > Privacy > Screen Recording. Otherwise, the Publisher will dispatch an accessDenied event.

New Features in OpenTok.js 2.28

New Features in OpenTok.js 2.28.3 — September 2024

We have extended the Publisher accessDenied event to be dispatched when the user revokes access to the camera or microphone after previously granting them. This is a beta feature.

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

New Features in OpenTok.js 2.28.2 — August 2024

Added support for audio input changed events. This version adds the audioInputDeviceChanged event, which the Publisher object dispatches when the audio input device changes. See this documentation. This is a beta feature.

Added support for central processing unit (CPU) usage events. This version adds the cpuPerformanceChanged event, which the Session object dispatches when there are changes in CPU usage. This is a beta feature.

New Features in OpenTok.js 2.28.1 — July 2024

Added support to disable audio input management. To disable audio input management, add the disableAudioInputDeviceManagement property to the options passed into the OT.initPublisher() method and set it to true. This is a beta feature.

Added support for publishVideo function callbacks. This is a beta feature.

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

New Features in OpenTok.js 2.28.0 — June 2024

Added support for media stream APIs for publishers and subscribers. See the Publisher mediaStreamAvailable and Subscriber mediaStreamAvailable events. This was previously a beta feature.

This release adds support for advanced noise suppression. See Applying the advanced noise suppression filter. This was previously a beta feature.

Added support for subscriber resolution optimization. You can now pass the "auto" value into the preferredResolution property of the options object you pass into the Session.subscribe() method. With the preferred resolution set to "auto", OpenTok.js automatically sets the preferred resolution for a subscriber, based on its dimensions in the browser. This feature only applies when subscribing to a stream that uses the scalable video feature. This was previously a beta feature.

Features added in previous versions

Show details.

Requirements

The OpenTok.js library is currently supported in:

Important: OpenTok.js version 2.16 was the last version to support the OpenTok Plugin for Internet Explorer. OpenTok.js version 2.16 was deprecated in May 2020 for the Standard environment and June 2020 for the Enterprise environment.

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:

For some users on macOS using the default webcam and Chrome 124+, audio and video can become desynchronized over time. Restarting the browser fixes the problem. This issue has been reported as a Chromium bug.

OpenTok 2.27 and later is not supported on Safari 14 and lower.

For iOS browser subscribers, in some cases, the audio level may be incorrect. We are working on a fix for this issue. This issue has been reported as a WebKit bug.

In Chrome Beta version 125.0.6422.4, using Media Processor APIs may cause video to freeze. This does not impact the stable or canary versions of Chrome. This issue has been reported as a Chromium bug.

On Windows, using background blur may cause a memory leak. We are working on a fix for this issue.

Screen share may freeze on Windows when certain apps are open. This issue has been reported as a Chromium bug.

In some cases, subscribers using browsers on iOS 17+ are seeing a blank screen. We are working on a fix for this issue.

For iOS 17+ browser users, video flickers when device orientation is changed and with resizing of the video. This issue has been reported as a WebKit bug.

In Chromium browsers, closing the laptop lid while publishing causes the publisher to be destroyed. This issue is a result of a Chromium bug.

Emojis unexpectedly appear in videos in iOS 17 and macOS 14 (Sonoma). This is a result of the new Apple [Reactions](https://support.apple.com/en-us/105117) feature. At this time, there is no API or programmatic to turn this off. End-users must disable it during a video session. On macOS, click the green video camera icon in the Mac's menu bar and then deselect Reactions. On iOS and iPadOS, open Control Center (by swiping down from the top-right corner or bottom of the screen, depending on the device), tap Video Effects, and then tap Reactions to disable it.

For Firefox users on Android 13, video resolution may be incorrect when switching orientation. Rotating a device running Android 13 may not cause the video resolution to be properly updated. This issue is the result of a reported Mozilla regression. Note: there is a pull request to fix this issue.

In Safari 17.0 and Safari 17.1, video resolution setting ignored for screen-sharing video. The resulting resolution is always 640x360, regardless of the resolution set when initializing the Publisher. This issue has been reported as a WebKit bug. This issue is fixed in Safari version 17.2.

In Safari 16.6, screen-sharing a window causes the page to reload. This has been fixed in the latest Safari Technology Review and Safari 17 releases.

In Safari 16.6, audio is not heard if you subscribe to an audio-only stream. We are working on a fix for this issue.

For users on iOS 17+, video is initially displayed as the wrong resolution in a video publisher, resulting in a visible flicker as the video resizes. This issue is the result of a reported Webkit regression.

For users on Chrome version 116.0.5845.110 running on Apple Silicon-based computers, video is flipped upside down when using a background blur or background replacement filter. This issue is the result of a reported Chromium bug. This issue is fixed in Chrome version 116.0.5845.140.

On iOS 16.4+ when using the iCloud Private Relay feature on Safari, users may experience disconnects in relayed sessions. We are currently investigating this issue. This has been reported as a WebKit bug.

On Safari, when calling the OT.initPublisher() method for initializing a screen-sharing publisher without a user gesture handler, you may receive an InvalidAccessError error. This is expected behavior for Safari.

In some cases, "MaxListenersExceededWarning" may be logged in the console. This shouldn't cause any problems. We are investigating this issue.

On iOS 14.8.1, a Publisher does not dispatch audioLevelUpdated events after the camera is switched. This issue was fixed in iOS 15.

In some cases, when tab-sharing a Google Slides presentation, the video is letter-boxed when the publisher's aspect-ratio is 4:3. This issue is not present when screen-sharing the Google Slides presentation.

On Android 12 and 13, Chrome requires using the "Media Volume" to adjust the volume instead of the phone's volume slider. This issue has been reported as a Chromium bug.

On iPhone 14 Pro and iPhone 14 Pro Max, there is no audio if a pre-call test is used before joining a meeting. We are investigating this issue.

On Android 13, Firefox microphone and camera permissions require a device restart. After you set the permissions in the browser, you need to restart the device for the permissions to take effect.

On iOS 16, video resolution may be incorrect when switching orientation. Rotating a device running iOS 16 may not cause the video resolution to be properly updated. This has been reported as a WebKit bug. Note that iOS 16 is currently in beta, and there is a pull request to fix this issue.

iOS Safari audio and video loss after incoming phone call. After an iOS device accepts an incoming phone call and returns to an OT session, the audio and video from the iOS device may be dropped. This has been reported here and here as WebKit bugs.

When background blur is enabled, cycling video may cause the camera LED to remain on, when calling Publisher.publishVideo(false). We are working on a fix for this issue.

Changing the background blur strength may cause the publisher's view to be momentarily black. We are working on a fix for this issue.

Publishing at Full High Definition (1080p) resolution in Firefox on macOS fails. This issue has been reported as a Mozilla bug.

Audio degradation over time on iOS/iPadOS devices with Safari. The audio quality for streams published from Safari on iOS/iPadOS may degrade over time with a growing crackling/distortion sound. This issue has been reported as a WebKit bug.

Audio not changing when using Chrome's "Share this tab instead" feature. Chrome does not use audio from the selected tab. We anticipate that the issue will be fixed in Chrome 103. This issue has been reported as a Chromium bug.

Audio issues when using Bluetooth devices in Safari 15. When subscribing to audio using Bluetooth devices, the audio may sound as if a filter was applied to it. For example, the audio received may sound robotic. We anticipate that the issue will be fixed in Safari 15.4. This issue has been reported as a WebKit bug.

Video can flicker for streams with the videoType set to "custom". This can happen if video content doesn't change much. Setting the content hint to text or detail mitigates the issue. See this developer guide topic and the documentation of the videoContentHint property the options you pass into the OT.initPublisher() method and the Publisher.setVideoContentHint() method. This issue has been reported as a Chromium bug.

Audio issues when pausing and unpausing the camera or screen sharing in Safari 15.2. In the address bar in Safari, if you click the camera icon and select the Pause option followed by the Unpause option, you will hear your own audio in the speaker. This issue also occurs if you share your screen. However, it does not occur in Safari on iOS, which does not include the Pause camera option or screen-sharing capabilities. This issue has been reported as a WebKit bug.

In Electron 17, an upcoming API change may cause screen-sharing to fail. See this Electron documentation page for details on the upcoming change. To use screen-sharing in Electron 17 onward, you may need to make some changes in your application. See the Electron 17 sample application screen-sharing with the OpenTok.js library.

In iOS 15, publishing video using an HTML Canvas element as the video source may fail. See this WebKit bug report.

On iOS 14.7+, the publisher's view may be black after being interrupted by Compact UI phone calls. See this WebKit bug report.

The accessDialogOpened event may be erroneously dispatched. When calling the OT.getUserMedia() method, the accessDialogOpened event may be dispatched, even though no access dialog was shown.

In relayed sessions, publishers may be unable to set audio bitrate of their audio stream. OpenTok.js v2.21.1 fixes this issue.

For some Android web users, device orientation may corrupt the publisher's video stream. We anticipate that the issue will be fixed on Chrome 97. This issue affects a subset of users in a VP8 session where the Chrome experimental "WebRTC hardware video encoding" setting is enabled. Disabling "WebRTC hardware video encoding" mitigates the issue. Changing the device's orientation may help as well, but artifacts (such as a green bar at the bottom of the video) may still be present. See this Chromium bug report. The issue also impacts mobile Firefox users. See this Mozilla bug report.

On iOS 14.5, publishers who mute themselves may not be able to unmute. This issue was fixed in iOS 14.6. See this WebKit bug report.

Critical audio bug in Safari 14.0.1, Safari 14.0.2, and iOS 14.2. Audio playback is stuttering in these browsers. This issue has been resolved in iOS 14.3, and it is expected to be resolved in Safari 14.0.3 (for macOS) when it is released. iOS users are advised to update to iOS 14.3, and macOS users are advised to use another supported browser until Apple releases Safari 14.0.3. See this WebKit bug report.

In Safari 13.1, if you call OT.getDevices() prior to OT.initPublisher(), the publisher will not include a video stream. We anticipate that the issue will be fixed in Safari 13.2.

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.

Echo cancellation disabled with stereo audio input in Chrome. Some browsers (such as Chome 73+) do not support echo cancellation for stereo audio (see this Chrome issue report).

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.

Desktop Safari displays videos upside down when using picture in picture mode. This issue only occurs when subscribing to a video stream published by an iOS Safari client in a routed session.

Fixed issues

Fixed in OpenTok.js 2.28.3

In some cases, importing the SDK would cause an error. We have fixed this issue.

In some cases, users could not be heard. We have fixed this issue.

Fixed in OpenTok.js 2.28.1

The applyAudioFilter type was incorrect in the TypeScript definition. We have fixed this issue.

Safari subscribers were generating unnecessary errors when receiving audio only from publishers. We have fixed this issue.

Fixed in OpenTok.js 2.27.7

In some cases, the audio level may return null. We have fixed this issue.

Fixed in OpenTok.js 2.27.6

In some cases, end-to-end encryption was not working properly when the encryption secret was updated. We have fixed this issue.

Fixed in OpenTok.js 2.27.5

Audio was occasionally lost when the audio input device was changed. We have fixed this issue.

Video was opening in full screen for iOS 17 subscribers. We have fixed this issue.

Video was occasionally going blank after joining a session. We have fixed this issue.

Fixed in OpenTok.js 2.27.4

The target property of the Subscriber connected and disconnected events included some undefined values. We have fixed this issue.

Fixed in OpenTok.js 2.27.3

In some cases, audio was not routed when switching audio input devices. We have fixed this issue.

In some cases, Electron apps running on Apple Silicon laptops could not publish. We have fixed this issue.

Fixed in OpenTok.js 2.27.2

In Safari, new subscribers were inaudible until bringing focus to the browser tab.We have fixed this issue.

Fixed in OpenTok.js 2.27.1

In some cases, when Live Captions were enabled, the stream.hasAudio property was not set correctly. We have fixed this issue.

In relayed sessions, subscriber video was freezing for users using browsers on iOS 17+. We have fixed this issue.

Fixed in OpenTok.js 2.26.4

In some cases, duplicate events were dispatched. We have fixed this issue.

Fixed in OpenTok.js 2.26.3

When transitioning backgrounds using the Publisher.applyVideoFilter() method, the background momentarily changes to solid black. We have fixed this issue.

Fixed in OpenTok.js 2.26.2

Some legacy code used an eval-based expression. We have fixed this issue.

In Safari 16.6, audio was not heard if you subscribed to an audio only stream. We have fixed this issue.

An error was appearing in the console when users disconnected from sessions. We have fixed this issue.

When users unpublished screen sharing, an incorrect reason was sent. We have fixed this issue.

Fixed in OpenTok.js 2.26.1

In some cases, audio was lost when switching audio devices in a session. We have fixed this issue.

In some cases, subscribers were not able to mute publishers. We have fixed this issue.

In some cases, an error occurred when the audio input was changed. 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 our support page.