openvidu-browser: srcObject defined before videoElementCreated

pull/261/head
pabloFuente 2019-05-21 12:53:35 +02:00
parent c0cae92d13
commit a728325c37
2 changed files with 3 additions and 10 deletions

View File

@ -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, <VideoInsertMode>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);

View File

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