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) {