From a728325c3759eda163bd58836039f283edf8b9a9 Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Tue, 21 May 2019 12:53:35 +0200 Subject: [PATCH] openvidu-browser: srcObject defined before videoElementCreated --- openvidu-browser/src/OpenVidu/Publisher.ts | 6 +++--- openvidu-browser/src/OpenVidu/StreamManager.ts | 7 ------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/openvidu-browser/src/OpenVidu/Publisher.ts b/openvidu-browser/src/OpenVidu/Publisher.ts index e2344ae8..8768d6f6 100644 --- a/openvidu-browser/src/OpenVidu/Publisher.ts +++ b/openvidu-browser/src/OpenVidu/Publisher.ts @@ -313,7 +313,9 @@ export class Publisher extends StreamManager { if (platform.name === 'Safari') { this.videoReference.setAttribute('playsinline', 'true'); } - + + this.stream.setMediaStream(mediaStream); + if (!!this.firstVideoElement) { let video = this.createVideoElement(this.firstVideoElement.targetElement, this.properties.insertMode); if (platform['isInternetExplorer']) { @@ -331,8 +333,6 @@ export class Publisher extends StreamManager { } } - this.stream.setMediaStream(mediaStream); - if (platform['isInternetExplorer']) { AdapterJS.webRTCReady(isUsingPlugin => { this.videoReference = this.customAttachMediaStreamIE(this.videoReference, mediaStream); diff --git a/openvidu-browser/src/OpenVidu/StreamManager.ts b/openvidu-browser/src/OpenVidu/StreamManager.ts index 4c80dee1..ec1961e0 100644 --- a/openvidu-browser/src/OpenVidu/StreamManager.ts +++ b/openvidu-browser/src/OpenVidu/StreamManager.ts @@ -362,13 +362,6 @@ export class StreamManager implements EventDispatcher { video.setAttribute('playsinline', 'true'); } - if (!video.id) { - video.id = (this.remote ? 'remote-' : 'local-') + 'video-' + this.stream.streamId; - // DEPRECATED property: assign once the property id if the user provided a valid targetElement - if (!this.id && !!this.targetElement) { - this.id = video.id; - } - } if (!this.remote && !this.stream.displayMyRemote()) { video.muted = true; if (video.style.transform === 'rotateY(180deg)' && !this.stream.outboundStreamOpts.publisherProperties.mirror) {