Retrocompatibility with 2.15.0: StreamLEGACY remote streams only for 2.15.0

pull/600/head
pabloFuente 2020-09-10 13:27:11 +02:00
parent 243dfcee67
commit c6019394ec
1 changed files with 82 additions and 94 deletions

View File

@ -155,11 +155,6 @@ export class StreamLEGACY extends Stream {
*/
initWebRtcPeerReceive(reconnect: boolean): Promise<any> {
if (!!this.session.openvidu.openviduServerVersion) {
// 2.16.0
return super.initWebRtcPeerReceive(reconnect);
} else {
// 2.15.0
return new Promise((resolve, reject) => {
@ -224,18 +219,12 @@ export class StreamLEGACY extends Stream {
});
}
}
/**
* @hidden
*/
remotePeerSuccessfullyEstablished(): void {
if (!!this.session.openvidu.openviduServerVersion) {
// 2.16.0
super.remotePeerSuccessfullyEstablished();
} else {
// 2.15.0
this.mediaStream = new MediaStream();
let receiver: RTCRtpReceiver;
@ -265,6 +254,5 @@ export class StreamLEGACY extends Stream {
}
}
}
}