This page includes information on the OpenTok.js 2.0 library. For information
on the latest version (2.2) of the OpenTok.js library, see
this page.
If you have any questions, concerns, feedback, please let us know on
our forums.
Announcements
New features
Requirements
Known issues
Fixed issues
For details on the OpenTok.js API, see the
OpenTok.js library reference.
Announcements
Support for TURN over TCP — This feature enables audio-video communication for clients in
network environments where UDP traffic is restricted. A TURN server relays audio-video streams to punch
through firewalls (when necessary). With TURN over TCP, audio-video streams can be sent and received in
environments where UDP traffic is restricted. Note that a video stream can be higher quality when sent
over UDP than when sent over TCP, so TCP is used only when UDP is not available. Currently, TURN over TCP
is not available for clients using Firefox. (We anticipate that it will be available in Firefox 28.)
OpenTok Media Router — OpenTok Media Router acts as a central switching station for non-peer-to-peer WebRTC streams.
OpenTok Media Router enables:
- High-quality multi-party video calls
- Reduced upload bandwidth consumption, with the ability to scale out a single WebRTC steam to many endpoints
- Cross-browser compatibility for Chrome and Firefox
- Interop with iOS apps built using the OpenTok on WebRTC iOS SDK version 2.1.2
To use OpenTok Media Router, set the peer-to-peer preference to false when creating
a session.
New Features on March 4, 2014 — v2.0.18
This release includes a number of improvements in performance and stability. Please see
Features added in previous versions,
Known issues, and Fixed
issues.
Features added in previous versions
Show details.
New Features on February 6, 2014 — v2.0.17
This release includes a number of improvements in performance and stability. Please see
Features added in previous versions,
Known issues, and Fixed
issues.
New Features on December 12, 2013 — v2.0.16
This release included a number of improvements in performance and stability.
New Features on November 11, 2013 — v2.0.15
Support for TURN over TCP. See the information in Announcements.
Other features. See the list of Features added in previous versions
and Fixed issues.
New Features on October 16, 2013 — v2.0.14
Modified Session.signal() API. The Session.signal()
method now takes a separate
completionHandler
parameter, instead of error
and success
properties
of the signal
parameter (as in the initial version of the signaling API). For details, see
the Session.signal() method.
Other changes. This release includes a number of improvements in performance and stability.
See the list of Features added in previous versions and
Fixed issues.
New Features on August 15, 2013 — v2.0.13
New signaling API. You can use the OpenTok signaling API to send text and data between clients connected
to an OpenTok session. These messages allow developers to build basic text chat, send instructions from one
client to another, and create other valuable experiences. See the documentation for the
Session.signal() method and for the
signal and
signal:type events. For
information on pricing, see the OpenTok pricing page.
Dynamic traffic shaping A Subscriber object dispatches the
videoDisabled event when the OpenTok
media server stops sending video to the subscriber. This feature of the
OpenTok Media Router
has a subscriber drop the video stream when connectivity degrades. The subscriber continues to receive the audio
stream, if there is one. This feature is only available in sessions that use the OpenTok Media Router, not in
peer-to-peer sessions.
Removed limitation on number of clients in peer-to-peer sessions. OpenTok no longer imposes a limitation
on the number of clients that can connect to a peer-to-peer session. However, with large numbers of connections,
clients will experience performance degradation and high bandwidth consumption. To alleviate these issues, you
can use a routed (non-peer-to-peer) session.
New Features on July 22, 2013 — v2.0.12
Dynamic traffic shaping. In sessions that use
OpenTok Media Router,
OpenTok now dynamically shapes audio and video to maximize the experience for every participant in a multi-point
conversation.
New Features on June 13, 2013 — v2.0.7
This release includes a number of improvements in performance and stability.
Note that the OpenTok on WebRTC JavaScript library now uses port 443, to take advantage of secure WebSockets,
which fixes some security errors. Port 443 must be open on the client network.
New Features on May 13, 2013 — v2.0.5
API for setting the audio level of a subscriber — You can set the initial volume of a Subscriber by
setting the audioVolume
property of the properties
parameter of the
Session.subscribe()
method. You can get and set the audio level of a Subscriber by calling the
getAudioVolume()
and setAudioVolume()
methods of the Subscriber object. For more information,
see the documentation for Session.subscribe(),
Subscriber.getAudioVolume(), and
Subscriber.setAudioVolume().
New Features on April 23, 2013 — v2.0.4
Increased connectivity — WebRTC is a peer-to-peer protocol that does not work on some restricted networks.
Many environments, especially cellular and corporate networks, have strict network policies that prevent WebRTC apps from
working. OpenTok on WebRTC now overcomes these restrictions to connect clients, even in environments that have NAT-style
firewalls. However, a client cannot use WebRTC if UDP is completely blocked on the network. You can use the OpenTok
Connectivity Doctor to determine if they can connect.
New Features on March 20, 2013 — v2.0.3
The TB object now includes TB.setLogLevel()
and TB.log()
methods. These let
you log debug information to the web console. For details, see the documentation on
TB.log() and
TB.setLogLevel().
This version includes a number of improvements in performance and stability. Please see the
list of known issues.
New Features on February 14, 2013 — v2.0.2
OpenTok on WebRTC is now supported in Firefox 22+.
To enable WebRTC code in Firefox, browse to about:config
and change the media.peerconnection.enabled
preference to true
.
The Publisher object now dispatches accessAllowed
, accessDenied
,
accessDialogOpened
, accessDialogClosed
events. For details, see the documentation on
Publisher events.
New Features on December 10, 2012 — v2.0.1
The OpenTok library alerts you with a message if you attempt to test using WebRTC on a page loaded from
a file:// URL. (To use WebRTC, you must load the page from a web server.)
This version includes a number of improvements in performance and stability. Please see the
list of known issues.
Requirements
The OpenTok on WebRTC JavaScript library is currently supported in:
-
Google Chrome (latest release version)
-
Google Chrome for Android (latest release version)
-
Firefox (latest release version)
The OpenTok on WebRTC JavaScript library uses port 443. Port 443 must be open on the client network.
Known issues
The following are known issues for this version of the OpenTok on WebRTC JavaScript library.
In Chrome, hiding an element that contains a Publisher or Subscriber (by setting the
display
CSS property to "none" causes the browser to crash. As a work-around, you can set the
visibility
property to "hidden", and set the height
and width
properties to "1px".
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 TB object dispatches
an exception
event object, with the code
property set to 1013.
You cannot publish using WebRTC on a page loaded from a file:// URL. You need to load the page from an http:// URL.
For example, you can test a file from http://localhost if you have a web server set up on your local machine.
Fixed issues
Fixed in v2.0.17
TURN over TCP support was not working. We have fixed this issue.
Subscribers calling the Subscriber.restrictFrameRate()
method displayed
lower than expected video quality in networks where there was packet loss. We have
fixed this issue.
Fixed in previous versions
Show details.
Fixed in v2.0.16
TURN support in Firefox 27. This fix improves connectivity in Firefox 27.
In v2.0 if you subscribe to the same stream twice and unsubscribe from one, the other one freezes.
We have fixed this issue.
CSS errors in subscribers when a the orientation of a mobile stream changes. We have fixed this issue.
Fixed in v2.0.15
If a client cancels a web page from unloading, any OpenTok session used in the page would disconnect.
We have fixed this issue.
Fixed in v2.0.14
The reason property was sometimes set wrong for the SessionDisconnectEvent and StreamEvent objects.
We have fixed this issue. The reason is now defined for sessionDisconnected
(SessionDisconnectEvent),
and streamDestroyed
(StreamEvent) events.
The following APIs did not work in Firefox:
- The
publishVideo
property of the properties
parameter of the TB.initPublisher()
method
- The
publishVideo()
method of the Publisher class
- The
subscribeToVideo()
methods of the Subscriber class
We have fixed these issues.
The Publisher's mute microphone button did not work in Firefox. We have fixed this issue.
Fixed in v2.0.6
The reason property was always undefined for the ConnectionEvent object.
We have fixed this issue.
Fixed in v2.0.4
The following audio toggle APIs did not work:
- The
publishAudio
property of the properties
parameter of the TB.initPublisher()
method (Publishers always published audio)
- The
publishAudio()
method of the Publisher class
- The
subscribeToAudio()
methods of the Subscriber class
We have fixed these issues.
If a client subscribes to a stream after the publisher mutes audio for the stream,
the client hears the publisher's audio. We have fixed this issue.
You cannot use the same session ID in the OpenTok library and the OpenTok on WebRTC library.
We have fixed this issue.
Fixed in v2.0.3
Video of streams published by iOS devices don't orient correctly when the device rotates.
We have fixed this issue.