Skip to content

Commit

Permalink
openvidu-angular: Avoid possible errors applying custom frame rate
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Oct 23, 2023
1 parent 98b783e commit 96af7d3
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,22 @@ export class OpenViduService {
this.disconnectSession(this.screenSession);
}

/**
*
* Apply the new resolution to the video stream if it is CAMERA type.
* @param streamManager
* @internal
*/
async updateVideoEncodingParameters(streamManager: StreamManager) {
if (!streamManager) return;
if (
!streamManager ||
!streamManager.stream ||
!streamManager.stream.getMediaStream() ||
streamManager.stream.typeOfVideo === VideoType.SCREEN
) {
return;
}

const track = streamManager?.stream.getMediaStream().getVideoTracks()[0];
const videoSender = streamManager?.stream
.getRTCPeerConnection()
Expand Down

0 comments on commit 96af7d3

Please sign in to comment.