mirror of https://github.com/OpenVidu/openvidu.git
openvidu-angular: Avoid possible errors applying custom frame rate
parent
98b783e968
commit
96af7d3225
|
@ -245,8 +245,22 @@ export class OpenViduService {
|
||||||
this.disconnectSession(this.screenSession);
|
this.disconnectSession(this.screenSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Apply the new resolution to the video stream if it is CAMERA type.
|
||||||
|
* @param streamManager
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
async updateVideoEncodingParameters(streamManager: StreamManager) {
|
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 track = streamManager?.stream.getMediaStream().getVideoTracks()[0];
|
||||||
const videoSender = streamManager?.stream
|
const videoSender = streamManager?.stream
|
||||||
.getRTCPeerConnection()
|
.getRTCPeerConnection()
|
||||||
|
|
Loading…
Reference in New Issue