Amazon chime SDK - Video not stopping when stopLocalVideoTile() is called

159 Views Asked by At

When on a video call and the stopLocalVideoTile() method is called (by clicking a button). I have also tried using removeLocalVideoTile() but it seems the videoTileWasRemoved() method never gets called

Here is the videoTileDidUpdate method. Any idea? Thanks.

  videoTileDidUpdate(tileState: VideoTileState): void {
    const videoElementId = tileState.localTile ? "local-video" : "remote-video";
    const videoElement: HTMLVideoElement = this.domElement(videoElementId);

    if (videoElement) {
      console.info("binding video element: " + videoElementId);
      this._audioVideo.bindVideoElement(tileState.tileId, videoElement);
    } else {
      console.error(videoElementId + " video not found");
    }
  }

videoTileWasRemoved

  videoTileWasRemoved(tileId: number) {
    console.info("unbinding video element: " + tileId);
    this._audioVideo.unbindVideoElement(tileId);
  }
0

There are 0 best solutions below