Skip to content

Releases: twilio/twilio-video.js

2.22.0

05 Jul 21:29
Compare
Choose a tag to compare

2.22.0 (July 5, 2022)

New Features

This release include the Media Warnings API (Beta) to help surface media related warning events on the SDK whenever the media server is not able to detect media from a published audio or video track.

Example

const room = await connect('token', {
  notifyWarnings: [ 'recording-media-lost' ]
  // Other connect options
});

Array.from(room.localParticipant.tracks.values()).forEach(publication => {
  publication.on('warning', name => {
    if (name === 'recording-media-lost') {
      console.log(`LocalTrack ${publication.track.name} is not recording media.`);

      // Wait a reasonable amount of time to clear the warning.
      const timer = setTimeout(() => {
        // If the warning is not cleared, you can manually
        // reconnect to the room, or show a dialog to the user
      }, 5000);

      publication.once('warningsCleared', () => {
        console.log(`LocalTrack ${publication.track.name} warnings have cleared!`);
        clearTimeout(timer);
      });
    }
  });
});

API Definitions

ConnectOptions

  • notifyWarnings - An array of warnings to listen to. By default, this array is empty and no warning events will be raised. Possible warning values include:

    • recording-media-lost - Raised when the media server has not detected any media on the published track that is being recorded in the past 30 seconds. This usually happens when there are network interruptions or when the track has stopped.

Events

The SDK raises warning events when it detects certain conditions. You can implement callbacks on these events to act on them, or to alert the user of an issue. Subsequently, "warningsCleared" event is raised when conditions have returned to normal.

  • LocalTrackPublication.on('warning', callback(name)) - Raised when the published Track encounters a warning.

  • LocalTrackPublication.on('warningsCleared', callback()) - Raised when the published Track cleared all warning.

  • LocalParticipant.on('trackWarning', callback(name, publication)) - Raised when one of the LocalParticipant's published tracks encounters a warning.

  • LocalParticipant.on('trackWarningsCleared', callback(publication)) - Raised when one of the LocalParticipant's published tracks cleared all warning.

  • Room.on('trackWarning', callback(name, publication, participant)) - Raised when one of the LocalParticipant's published tracks in the Room encounters a warning.

  • Room.on('trackWarningsCleared', callback(publication, participant)) - Raised when one of the LocalParticipant's published tracks in the Room cleared all warning.

2.21.3

07 Jun 23:57
Compare
Choose a tag to compare

2.21.3 (June 7, 2022)

Bug Fixes

  • Fixed an issue where the generated API documentation has a missing search bar. (VIDEO-10199)

2.21.2

02 Jun 02:27
Compare
Choose a tag to compare

Bug Fixes

  • Fixed an issue where some extraneous errors were logged to console when a video track was stopped. (VIDEO-9511)
  • Fixed an issue where the dimensionsChanged event was not firing when the track dimensions first became available. (VIDEO-3576)
  • Removed references to node dependencies that causes build errors on Angular and Vue. (VIDEO-9282)
  • Fixed an issue where incorrect device was detected when using iPad in Desktop Website mode. (VIDEO-8282)

2.21.1

22 Mar 21:59
Compare
Choose a tag to compare

Bug Fixes

  • Fixed the issue where twilio-video.js does not build with the latest version of webpack and vite. (VIDEO-8609)

2.21.0

08 Mar 23:22
Compare
Choose a tag to compare

New Features

Known Issue

Some common issues such as interruptions on mobile devices which includes, backgrounding the application, or switching between applications can sometimes cause VideoTracks to go black or AudioTracks to stop.

2.20.1

17 Feb 19:36
Compare
Choose a tag to compare

2.20.1 (Feb 17, 2022)

Bug Fixes

  • Fixed a bug that was introduced in 2.19.0 where the published LocalVideoTracks of Participants on older iOS versions 14.5 and below did not encode and transmit media. (VIDEO-8770)

2.20.0

10 Feb 20:54
Compare
Choose a tag to compare

2.20.0 (February 10, 2022)

Changes

The Preflight API (runPreflight), originally released in 2.16.0, has been promoted to GA.

Thank you @morninng @eroidaaruqaj #1622 for your feedback. Based on this feedback, we have made the following changes to runPreflight. (VIDEO-7728)

  • The failed event now provides a PreflightTestReport which include partial results gathered during the test. Use this in addition to the error object to get more insights on the failure.

  • Signaling and Media Connection errors are now properly surfaced via the failed event.

  • PreflightTestReport now includes a progressEvents property. This new property is an array of PreflightProgress events detected during the test. Use this information to determine which steps were completed and which ones were not.

You can learn more about runPreflight usage in the documentation, here.

Other changes in this release includes:

  • In October 2019, twilio-video.js started using Unified Plan where available, while also maintaining support for earlier browser versions with Plan B as the default SDP format. With this release, twilio-video.js will now stop supporting the Plan B SDP format and will only support the Unified Plan SDP format. Please refer to this changelog and this public advisory for more related information. (VIDEO-6587)

2.19.1

07 Feb 18:06
Compare
Choose a tag to compare

2.19.1 (February 7, 2022)

Bug Fixes

  • Fixed a bug where media connection was not getting reconnected after a network interruption if participant was not subscribed to any tracks. (VIDEO-8315)
  • Fixed a bug where network quality score stops updating after network glitches. (VIDEO-8413)

2.19.0

31 Jan 16:40
Compare
Choose a tag to compare

New Features

  • This release introduces a new feature Adaptive Simulcast. This opt-in feature can be enabled by setting preferredVideoCodecs="auto" in ConnectOptions. When joining a group room with this feature enabled, the SDK will use VP8 simulcast, and will enable/disable simulcast layers dynamically, thus improving bandwidth and CPU usage for the publishing client. It works best when used along with Client Track Switch Off Control and Video Content Preferences. These two flags allow the SFU to determine which simulcast layers are needed, thus allowing it to disable the layers not needed on publisher side. This feature cannot be used alongside maxVideoBitrate.

If your application is currently using VP8 simulcast we recommend that you switch to this option.

Example:

const { connect } = require('twilio-video');

const room = await connect(token, {
  preferredVideoCodecs: 'auto',
  bandwidthProfile: {
    video: {
      contentPreferencesMode: 'auto',
      clientTrackSwitchOffControl: 'auto'
    }
  }
});

Known Limitations

  • Specifying preferredVideoCodecs="auto" will revert to unicast in the following cases:
    • The publisher is using Firefox.
    • The publisher has preferred the H264 codec.
    • The Room is configured to support only the H264 codec.
    • Peer-to-Peer Rooms
  • When the participant is being recorded, the SFU will not disable any simulcast layers of the participant's VideoTrack.

Bug Fixes

  • Fixed a bug where clientTrackSwitchOffControl and contentPreferencesMode sometimes did not work as expected during network glitches. (VIDEO-7654)

2.18.3

04 Jan 22:56
Compare
Choose a tag to compare

2.18.3 (January 4, 2022)

Bug Fixes

  • Fixed a bug where connect was returning a Promise type instead of a CancelablePromise. (VIDEO-7831)
  • Fixed a bug where audioLevel, frameRate, and captureDimensions WebRTC stats are returning null on certain browsers. With this release, these stats are now populated whenever they are available. (VIDEO-3600)