Update dependency twilio-video to v2 #20
                
     Open
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This PR contains the following updates:
^1.18.1->^2.0.0Release Notes
twilio/twilio-video.js (twilio-video)
v2.32.1Compare Source
====================
Bug Fixes
LocalVideoTrack.restart()would fail on some devices when a video processor was active.v2.32.0Compare Source
====================
New Features
Real-Time Transcriptions Support
Added real-time transcription capabilities for group rooms, allowing the capture and display of real-time captions during video calls.
Usage
To receive transcriptions, set the
receiveTranscriptionsoption totruewhen connecting to a room. Then, subscribe to thetranscriptionevent to receive real-time transcription data:See the Transcription's documentation for more details.
v2.31.0Compare Source
=======================
New Features
Document Picture-in-Picture API Support
Previously, when
Client Track Switch Off Controlwas set toauto, video tracks were automatically switched off—even if they were visible and rendered in a Document Picture-in-Picture (PiP) window. This caused issues where users could see the video element, but the track itself was disabled. In this new SDK version, video tracks will remain active and continue to play when displayed in a PiP window.v2.30.0Compare Source
========================
New Features
WebRTC Overrides (Beta)
The SDK now enables you to override WebRTC APIs with the following options. If your environment supports WebRTC redirection—such as Citrix HDX's WebRTC redirection technologies—your application can leverage this new beta feature to enhance media quality in those environments. For more details, please refer to the JavaScript WebRTC Overrides documentation.
ConnectOptions
rtcConfiguration- An optionalRTCConfigurationobject passed to the RTCPeerConnection constructor.RTCPeerConnection- Allows overriding the nativeRTCPeerConnectionclass.ConnectOptions and CreateLocalTracksOptions
getUserMedia- Overrides the nativeMediaDevices.getUserMediaAPI.enumerateDevices- Overrides the nativeMediaDevices.enumerateDevicesAPI.MediaStream- Overrides the nativeMediaStreamclass.mapMediaElement- Callback triggered after a media track is attached to an audio or video element.disposeMediaElement- Callback triggered after a media track is detached from an audio or video element.Bug Fixes
v2.29.0Compare Source
================================
Changes
Video Processor V3 support (Beta)
AddProcessorOptions.outputFrameBufferContextType = 'bitmaprenderer'is now supported on Safari and Firefox. (VBLOCKS-3643, VBLOCKS-3644)AddProcessorOptions.inputFrameBufferTypenow has a new valuevideoframe. On browsers that supportVideoFrame, theinputFrameBufferargument ofVideoProcessor.processFrame()will be aVideoFrame. On other supported browsers, it will be anHTMLVideoElement.AddProcessorOptions.outputFrameBufferContextTypenow has a new valuebitmaprenderer. Currently, this is only supported for Chromium-based browsers. On other supported browsers, it falls back to2d.v2.28.2Compare Source
==========================
Bug Fixes
MediaStreamTrackwould incorrectly set theenabledproperty totrueinstead of preserving the original disabled state. This ensures track cloning behavior matches the MediaStreamTrack specification and works consistently across browsers. Bug report: https://bugs.webkit.org/show_bug.cgi?id=281758v2.28.1Compare Source
========================
Bug Fixes
v2.28.0Compare Source
===========================
Bug Fixes
v2.27.0Compare Source
=======================
Changes
VideoTrack.addProcessornow works on browsers that supportOffscreenCanvasas well asHTMLCanvasElement. When used with@twilio/video-processors v2.0.0, the Virtual
Background feature will work on browsers that supports WebGL2.
See VideoTrack.addProcessor and
@twilio/video-processors v2.0.0 for details.
Example
v2.26.2Compare Source
==========================
Changes
whenever an audio or a video codec that is specified in
ConnectOptions.preferredAudioCodecsandConnectOptions.preferredVideoCodecsis not supported by the browser. (VIDEO-12494)
Bug Fixes
Room.getStats()did not reject the returned Promise when an exception wasraised while accessing WebRTC stats that due to a TypeError caused by trying to read from the now-removed
RTCMediaStreamTrackStats. (VIDEO-12534)v2.26.1Compare Source
=========================
Bug Fixes
Room.getStats()raises an unhandled exception due to aTypeError caused by trying to read from the now-removed
RTCMediaStreamTrackStats. Instead, the SDK now reads fromthe
RTCMediaSourceStats. (VIDEO-12411)attach()method ofAudioTrackandVideoTrack. (VIDEO-12242)createLocalAudioTrack(). (VIDEO-12383)v2.26.0Compare Source
==========================
New Features
The
LocalAudioTrackandLocalVideoTrackclasses now provide anew boolean property called
isMuted, which lets you know if the audio or video source is currently providing raw mediasamples. The classes also emit
mutedandunmutedevents if the value ofisMutedtoggles. The application can usethese APIs to detect temporary loss of microphone or camera to other applications (ex: an incoming phone call on an iOS device),
and update the user interface accordingly. (VIDEO-11360)
The
Roomclass provides a new method called refreshInactiveMedia,which restarts any muted local media Tracks, and plays any inadvertently paused HTMLMediaElements that are attached to
local and remote media Tracks. This is useful especially on iOS devices, where sometimes your application's media may
not recover after an incoming phone call. You can use this method in conjunction with the local media Track's
isMutedproperty described previously to recover local and remote media after an incoming phone call as shown below. (VIDEO-11360)
Vanilla JS
html
js
React
src/hooks/useLocalMediaMuted.js
src/components/room.js
v2.25.0Compare Source
==========================
New Features
Auto-switch default audio input devices
This release adds a new feature that preserves audio continuity in situations where end-users change the default audio input device.
A LocalAudioTrack is said to be capturing audio from the default audio input device if:
{ audio: true }, or{ audio: { deviceId: 'foo' } }, and "foo" is not available, or{ audio: { deviceId: { ideal: 'foo' } } }and "foo" is not availableIn previous versions of the SDK, if the default device changed (ex: a bluetooth headset is connected to a mac or windows laptop),
the LocalAudioTrack continued to capture audio from the old default device (ex: the laptop microphone). Now, a LocalAudioTrack
will switch automatically from the old default audio input device to the new default audio input device (ex: from the laptop microphone to the headset microphone).
This feature is controlled by a new CreateLocalAudioTrackOptions
property
defaultDeviceCaptureMode, which defaults toauto(new behavior) or can be set tomanual(old behavior).The application can decide to capture audio from a specific audio input device by creating a LocalAudioTrack:
{ audio: { deviceId: 'foo' } }, and "foo" is available, or{ audio: { deviceId: { ideal: 'foo' } } }and "foo" is available, or{ audio: { deviceId: { exact: 'foo' } } }and "foo" is availableIn this case, the LocalAudioTrack DOES NOT switch to another audio input device if the current audio input device is no
longer available. See below for the behavior of this property based on how the LocalAudioTrack is created. (VIDEO-11701)
Limitations
v2.24.3Compare Source
=========================
Bug Fixes
v2.24.2Compare Source
===========================
Bug Fixes
MediaClientRemoteDescFailedErrorwas raised when a Chrome Participant who had enabledAdaptive Simulcast (
ConnectOptions.preferredVideoCodecs = 'auto') tried to publish a camera Track after publishing a<canvas>Track. (VIDEO-11516)directives
default-src self unsafe-evalare used. (VIDEO-11537)v2.24.1Compare Source
==========================
Bug Fixes
logLevelas an optional property. (VIDEO-10659)importkeyword was causing problems in webpack and typescript projects. (VIDEO-11220)v2.24.0Compare Source
========================
New Features
Bug Fixes
localAudioTrack.stop()when using noiseCancellation (VIDEO-11047)v2.23.0Compare Source
======================
New Features
Once you get the access to the plugin, You can install it from npm with:
Once installed, you need to host the contents of
./node_modules/<noise_cancellation_plugin>/dist/from your web server. We recommend that you add plugin version number to the hosted path to ensure that browser does not use stale version when its updated. You need to pass the path to the hosted files totwilio-videosdk when creating audio track as shown in the example below. The example below assumes that you have hosted the files at/noise_cancellation_plugin/1.0.0/diston your web server.NOTE: If your application is using the
default-src selfcontent security policy directive, then you should addanother directive
unsafe-eval, which is required for the Krisp Audio Plugin to load successfully.v2.22.2Compare Source
======================
Changes
isSupportedflag now returnsfalseif the browser does not support the Unified Plan SDP format. (VIDEO-10307)The following is a list of browsers with Unified Plan as the default SDP format.
v2.22.1Compare Source
======================
Bug Fixes
their quality in limited network conditions. (VIDEO-10212)
v2.22.0Compare Source
====================
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
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.
v2.21.3Compare Source
====================
Bug Fixes
v2.21.2Compare Source
=====================
Bug Fixes
dimensionsChangedevent was not firing when the track dimensions first became available. (VIDEO-3576)v2.21.1Compare Source
=======================
Bug Fixes
v2.21.0Compare Source
======================
New Features
twilio-video.js now supports WKWebView and SFSafariViewController on iOS version 14.3 or later. The
isSupportedflag relies partly on the User-Agent string to determine if twilio-video.js officially supports the user's browser. If your application modifies the default value for the User-Agent string, the new value should follow the correct format.Additionally, for iOS applications, your application will need to include the camera usage description, microphone usage description and inline media playback in order for the SDK to work on WKWebView.
Note: As with Safari, WKWebViews only support only one local media track of each kind at a time.
We also would like to thank @cbxp for his contribution. (VIDEO-8374)
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.
v2.20.1Compare Source
=====================
Bug Fixes
v2.20.0Compare Source
==========================
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
progressEventsproperty. 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
runPreflightusage in the documentation, here.Other changes in this release includes:
v2.19.1Compare Source
=========================
Bug Fixes
v2.19.0Compare Source
=========================
New Features
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 withClient Track Switch Off ControlandVideo 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 alongsidemaxVideoBitrate.If your application is currently using VP8 simulcast we recommend that you switch to this option.
Example:
Known Limitations
preferredVideoCodecs="auto"will revert to unicast in the following cases:Bug Fixes
clientTrackSwitchOffControlandcontentPreferencesModesometimes did not work as expected during network glitches. (VIDEO-7654)v2.18.3Compare Source
========================
Bug Fixes
audioLevel,frameRate, andcaptureDimensionsWebRTC stats are returning null on certain browsers. With this release, these stats are now populated whenever they are available. (VIDEO-3600)v2.18.2Compare Source
==========================
Bug Fixes
clientTrackSwitchOffControltoautocaused the RemoteVideoTracks to get switched off while playing in picture-in-picture mode. Note that this fix does not apply to Firefox as it does not yet implement picture-in-picture APIs. (VIDEO-6677)v2.18.1Compare Source
=========================
Changes
runPreflight). There are no changes to the public APIs in this release. (VIDEO-6891)v2.18.0Compare Source
=========================
New Features
it will fail with a RoomTrackKindNotSupportedError. (VIDEO-7242)
Known Issue
In Firefox, although the publishing of a LocalVideoTrack in an Audio Only Group Room fails,
the RoomTrackKindNotSupportedError is not raised. We are actively working on fixing this issue.
v2.17.1Compare Source
===========================
Bug Fixes
2.17.0which caused Chrome screen share tracks to be encoded at lower dimensions. (VIDEO-7000)v2.17.0Compare Source
===========================
New Features
Bug Fixes
v2.16.0Compare Source
========================
New Features
This release includes the Preflight API Public Beta (
runPreflight) to help test connectivity with Twilio servers. It can be used to detect issues prior to joining a Video Room or as part of a troubleshooting page.The API connects two peer connections using Twilio's Signaling and TURN servers. It publishes synthetic audio and video tracks from one participant and ensures that other participant receives media on those tracks. After successfully verifying connectivity, it generates a report with information on the connection.
runPreflightwas originally introduced as an experimental API in2.8.0-beta1and has been updated based on feedback. In short, usage of the API will now be free of charge.Example:
The PreflightTestReport generated by
preflightTestoncompletedprovides statistics that can be useful in cases where there is a poor connection. Some of the useful statistics in the report are as follows:progressevents, such as time to connect or to receive media.preflightTestemits afailedevent to indicate test failures. You can use the PreflightProgress events to better understand where the test failed and refer tothis guide for interpreting common errors.
A few things to note:
testMediaConnectionBitratefrom the RTC Diagnostics SDK.Bug Fixes
Fixed a bug where the SDK was holding on to internally maintained audio elements longer than needed, now they will be cleaned up once track has started. (VIDEO-6480)
v2.15.3Compare Source
======================
Bug Fixes
Fixed a bug where the SDK was not cleaning up internally maintained media elements. This causes memory leaks on certain use cases such as reconnecting or republishing to a room (VIDEO-6336).
Additionally, Chrome 92 started enforcing limit on number of WebMediaPlayers. This blocks creation of WebMediaPlayers once the limit is reached - 75 for desktop and 40 for mobile. This SDK update will help prevent running into this limit issue on use cases such as reconnecting or republishing to a room. Please ensure that your application cleans up media elements as well after they are detached.
Please be aware that your application may still run into the Chrome's WebMediaPlayers limit for large rooms where participants exceeds this limit.
v2.15.2Compare Source
======================
Bug Fixes
Fixed a bug where setting clientTrackSwitchOffControl to
autocaused the tracks to get switched off aggressively, which resulted in momentary black track during app layout changes (VIDEO-5226).v2.15.1Compare Source
=====================
New Features
Updated June 24, 2021
Bug Fixes
v2.15.0Compare Source
=====================
Breaking Change on Video Processor API (Beta)
VideoProcessor.processFrame method signature has been changed in order to improve the performance of the Video Processor API. With this update, the output frame buffer is now provided to the
processFramemethod which should be used to draw the processed frame.Old signature:
New signature:
Example:
Bug Fixes
Fixed a bug where
isSupportedwas returningtrueon certain unsupported mobile browsers. With this release,isSupportedshould now return true only for the browsers supported by twilio-video.js.Updated NetworkQualityBandwidthStats documentation to reflect the correct bandwidth units, in bits per second, instead of bytes.
v2.14.0Compare Source
=====================
New Features
This release contains a significant update to the Bandwidth Profile API. It allows for more efficient use of bandwidth and CPU in multi-party applications. In addition it provides developers with more dynamic control over which video tracks are delivered to the client and the preferred video resolution of the tracks. These capabilities are provided via the Client Track Switch Off Control and Content Preferences settings.
Existing Bandwidth Profile settings will continue to function as before, however we recommend developers update their Bandwidth Profile settings to make use of these new capabilities at their earliest convenience.
Client Track Switch Off Control
RemoteVideoTrack.switchOff()/switchOn()methods.maxTracksproperty to limit the number of tracks visible, you should migrate to usingclientTrackSwitchOffControlto take advantage of this feature.Video Content Preferences
RemoteVideoTrack.setContentPreferences().renderDimensionsproperty, you should migrate to usingcontentPreferencesModeto take advantage of this feature.Both of these features are available in Group Rooms and are enabled by default if your application specifies Bandwidth Profile Options during connect.
Migrating to Attach APIs
The automatic behaviors rely on applications using the attach and detach methods of
RemoteVideoTrack. If your application currently uses the underlyingMediaStreamTrackto associate Tracks to video elements, you will need to update your application to use the attach/detach methods or use the manual APIs.Manual Controls
When manual controls are used you can operate directly on
RemoteVideoTrackto specify preferences. For example, applications can:v2.13.1Compare Source
=======================
New Features
Bug Fixes
v2.13.0Compare Source
======================
New Features
Video Processor API Pilot (Chrome only)
You can now register a
VideoProcessorwith a VideoTrack in order to process its video frames. In a LocalVideoTrack, video frames are processed before being sent to the encoder. In a RemoteVideoTrack, video frames are processed before being sent to the attached<video>element(s). TheVideoProcessorshould implement the interface shown below. (VIDEO-3560, VIDEO-3561)A VideoTrack provides new methods addProcessor and removeProcessor which can be used to add and remove a VideoProcessor. It also provides a new property
processorwhich points to the current VideoProcessor being used by the VideoTrack. For example, you can toggle a blur filter on a LocalVideoTrack as shown below.You can also toggle a blur filter on a RemoteVideoTrack as shown below.
v2.12.0Compare Source
=====================
New Features
100 Participant Rooms Pilot
A Room created with Max Participants greater than 50 is structured to support a small number of presenters and a large number of viewers. It has the following behavioral differences compared to regular Group Rooms:
publishes the first LocalTrack.
stops publishing all of its LocalTracks.
to publish more Tracks will be rejected with a
ParticipantMaxTracksExceededError. (JSDK-3021)Bug Fixes
LocalMediaTrack.restart()logged a warning about PeerConnection being closed in Peer to Peer Rooms. (JSDK-2912)switchedOffevent forRemoteVideoTrackto not get emitted, which also resulted in wrong value forRemoteVideoTrack.isSwitchedOffproperty. (VIDEO-3695)v2.11.0Compare Source
=========================
You can access the types of the public API classes from the
Videonamespace as shown belowConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.