github twilio/twilio-video.js 1.11.0

latest releases: 2.8.2-rc1, 2.28.2-rc1, 2.28.1...
5 years ago

1.11.0 (July 3, 2018)

New Features

  • Participants now include a networkQualityLevel property that represents the
    quality of their connection to the Room. This feature depends on server-side
    support, which we are rolling out gradually. As such, expect this value to
    always be null for the time being. We will make an announcement once
    the feature is enabled.
    Participants will also emit a
    "networkQualityLevelChanged" event when this value changes. See the Network
    Quality Level Guide below for more information on this feature.

  • Room now includes a dominantSpeaker property that represents the
    RemoteParticipant publishing the loudest RemoteAudioTrack your
    LocalParticipant is subscribed to, if any. Whenever the Dominant Speaker
    changes, Room emits the "dominantSpeakerChanged" event. This feature depends
    on server-side support, which we are rolling out gradually. As such, expect
    this value to always be null for the time being. We will make an
    announcement once the feature is enabled.
    This feature is currently
    unsupported in Peer-to-Peer (P2P) Rooms.

  • Added a workaround for
    WebKit Bug 180748, where, in
    Safari, getUserMedia may return a silent MediaStreamTrack. The workaround
    works by detecting the silence (this takes up to 250 ms) and retrying
    getUserMedia (up to 3 times). Enable it by setting the
    workaroundWebKitBug180748 property to true in CreateLocalTrackOptions:

    connect(token, { audio: { workaroundWebKitBug180748: true } });
    createLocalAudioTrack({ workaroundWebKitBug180748: true });
    createLocalTracks({ audio: { workaroundWebKitBug180748: true } });

Network Quality Level Guide

Participants (both LocalParticipants and RemoteParticipants) now include a
networkQualityLevel property that represents the quality of their connection
to the Room. This value is not always known. For example, in Peer-to-Peer (P2P)
Rooms, we do not compute it; therefore, the value is always null. We will
compute this value in Group Rooms, first for the LocalParticipant, and then for
the RemoteParticipants; however, this feature is being rolled out gradually, and
so we are shipping SDK changes ahead of the server-side changes.

If a Participant's Network Quality Level is known, then it has some value 0–5,
where 0 represents an unusable connection, 1 represents a very poor connection,
and 5 represents an excellent connection. While a Room is in the "reconnecting"
state, a LocalParticipant's networkQualityLevel, if it was being computed, is
set to 0.

Example Usage

In this example, we print a string representing a Participant's Network Quality
Level as cell phone-style signal bars:

function printNetworkQualityLevel(networkQualityLevel) {
  console.log({
    1: '▃',
    2: '▃▄',
    3: '▃▄▅',
    4: '▃▄▅▆',
    5: '▃▄▅▆▇'
  }[networkQualityLevel] || '');
}

// Print the initial Network Quality Level
printNetworkQualityLevel(participant.networkQualityLevel);

// Print changes to Network Quality Level
participant.on('networkQualityLevelChanged', printNetworkQualityLevel);

Bug Fixes

  • Fixed a bug where subscribing to or unsubscribing from a RemoteTrack using
    the Track Subscription REST API did not emit "trackSubscribed" or
    "trackUnsubscribed" events on the RemoteParticipant. (JSDK-2031)

  • Fixed a bug where if a Firefox or Safari Participant gets disconnected from a
    group Room due to duplicate identity error, a "disconnected" event is
    emitted on the Room without the corresponding TwilioError. (JSDK-1931)

  • Fixed a bug where calling removeTracks attempted to call stop on a
    LocalDataTrack, resulting in an error (LocalDataTrack does not have a stop
    method). (JSDK-2063)

Don't miss a new twilio-video.js release

NewReleases is sending notifications on new releases.