2.0.0
2.0.0 (March 21, 2023)
- The VideoProcessors now work on browsers that do not support
OffscreenCanvas
. With this release, when used with twilio-video v2.27.0, the Virtual Background feature will work on browsers that supports WebGL2. See VideoTrack.addProcessor for details. - On Chrome, our tests with 640x480 VideoTracks show up to 30% reduction in CPU usage if WebGL2 is used as opposed to Canvas2D. Higher resolutions degrade the performance as compared to Canvas2D. While we work to support higher resolutions in future releases, we strongly recommend that you set the maximum resolution to 640x480 for WebGL2.
API Changes
- isSupported now returns
true
for browsers that supports canvas 2D or webgl2 rendering context. - GaussianBlurBackgroundProcessor and VirtualBackgroundProcessor's
processFrame
method now accepts different types ofinputFrameBuffer
-OffscreenCanvas
,HTMLCanvasElement
orHTMLVideoElement
. - Added the following new options
NOTES:
- Although iOS and Android browsers (Safari and Chrome) are supported, the performance of the VideoProcessors is not optimized for mobile browsers at this time. Using the VideoProcessors on a mobile browser may overpower the CPU resulting in poor quality video experiences.
- Since desktop Safari and iOS browsers do not support WebAssembly SIMD, it is recommended to use camera input dimensions of 640x480 or lower to maintain an acceptable frame rate for these browsers.
Example
See the following pages for best practice.
Other Changes
- Removing unused BodyPix related logic.
- Removing unnecessary loading of JS files after loading the model.