diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c76d763da..4a7d98c2bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Clean up the HTML video element bounded to `VideoTileState` using `unbindVideoElement` API to fix Safari memory leak. If you do not intend to clean the video element, call `unbindVideoElement` API with `cleanUpVideoElement` set to `false`. Check [PR#2217](https://github.com/aws/amazon-chime-sdk-js/pull/2217) for detailed information. + ### Fixed - Fix issue where video resolution and framerate changes when toggle video transform. diff --git a/docs/classes/defaultaudiovideofacade.html b/docs/classes/defaultaudiovideofacade.html index f53a1ed59a..dbe094c142 100644 --- a/docs/classes/defaultaudiovideofacade.html +++ b/docs/classes/defaultaudiovideofacade.html @@ -2236,7 +2236,7 @@
A flag to indicate whether this function is called due to pausing video tile. - If true, then we will not stop the stream's tracks and just clearing out the srcObject.
+ Based onkeepLastFrameWhenPaused
, it sets HTMLVideoElement.srcObject
to null
.
If true and dueToPause is also true, then we will not clear out the srcObject of the - video element when it is paused and therefore, the last frame of the stream will be shown.
+If true
and dueToPause
is also true
, then we will not set HTMLVideoElement.srcObject
of the
+ video element to null
when it is paused and therefore, the last frame of the stream will be shown.
Unbinds the video element from the tile if it exists for the provided tileId. - The video tile's bounded video element and that element's width and height are set to null. - This does not remove the provided tileId mapping from the tile map in the DefaultVideoTileController. - To remove the mapping and destroy the tile for this tileId, you can use removeVideoTile.
+Unbinds the video element from the tile if it exists for the provided tileId
.
+ The video tile's bounded video element and that element's width
and height
are set to null.
By default, the bounded video element's srcObject
is also set to null.
+ Pass false
for cleanUpVideoElement
, if you do not intend to set the bounded video element's srcObject
to null
.
+ This does not remove the provided tileId
mapping from the tile map in the DefaultVideoTileController.
+ To remove the mapping and destroy the tile for this tileId
, you can use removeVideoTile.
You are responsible for maintaining HTMLVideoElement objects in the DOM and arranging their layout within the web page. To display a video, you must handle the videoTileDidUpdate and videoTileWasRemoved callbacks in an AudioVideoObserver. In the implementation of videoTileDidUpdate, bind the tile ID from the provided VideoTileState with the HTMLVideoElement in your DOM by calling meetingSession.audioVideo.bindVideoElement(tileId, videoElement).
-To unbind a tile, call meetingSession.audioVideo.unbindVideoElement(tileId).
+To unbind a tile, call meetingSession.audioVideo.unbindVideoElement(tileId). Note that this will also set HTMLVideoElement.srcObject
to null
. Call unbindVideoElement(tileId, false)
to avoid the video element clean up. Check this PR description for more details.
A tileId
is a unique identifier representing a video stream. When you stop and start, it generates a new tileId
. You can have tileIds exceeding 25; they merely identify a particular stream uniquely. When you start video it consumes a video publishing slot, when you stop video it releases that video publishing slot. Pausing does not affect video publishing slots; it allows a remote to choose to not receive a video stream (and thus not consume bandwidth and CPU for that stream).
Disconnect a video stream to a video element by clearing the srcObject of the video element. - This will also stop all the tracks of the current stream in the srcObject.
+Disconnect a video stream from a video element by setting
HTMLVideoElement.srcObject
tonull
.