mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: IE final fixes
parent
b70581addc
commit
227eefd99b
|
@ -814,9 +814,6 @@ export class OpenVidu {
|
||||||
width: simVideo.videoWidth,
|
width: simVideo.videoWidth,
|
||||||
height: simVideo.videoHeight
|
height: simVideo.videoHeight
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: if screen-share, set this.screenShareResizeInterval
|
|
||||||
|
|
||||||
str.isLocalStreamReadyToPublish = true;
|
str.isLocalStreamReadyToPublish = true;
|
||||||
str.ee.emitEvent('stream-ready-to-publish', []);
|
str.ee.emitEvent('stream-ready-to-publish', []);
|
||||||
};
|
};
|
||||||
|
|
|
@ -427,7 +427,14 @@ export class StreamManager implements EventDispatcher {
|
||||||
*/
|
*/
|
||||||
addPlayEventToFirstVideo() {
|
addPlayEventToFirstVideo() {
|
||||||
if ((!!this.videos[0]) && (!!this.videos[0].video) && (this.videos[0].video.oncanplay === null)) {
|
if ((!!this.videos[0]) && (!!this.videos[0].video) && (this.videos[0].video.oncanplay === null)) {
|
||||||
this.videos[0].video.addEventListener('canplay', platform['isInternetExplorer'] ? (<any>window).IEOnCanPlay(this) : this.canPlayListener);
|
if (platform['isInternetExplorer']) {
|
||||||
|
if (!(this.videos[0].video instanceof HTMLVideoElement)) {
|
||||||
|
// Add canplay event listener only after plugin has inserted custom video element (not a DOM HTMLVideoElement)
|
||||||
|
(<any>this.videos[0].video).addEventListener('canplay', (<any>window).IEOnCanPlay(this));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.videos[0].video.addEventListener('canplay', this.canPlayListener);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -497,6 +504,10 @@ export class StreamManager implements EventDispatcher {
|
||||||
|
|
||||||
// Always launch videoElementCreated event after IE plugin has inserted simulated video into DOM
|
// Always launch videoElementCreated event after IE plugin has inserted simulated video into DOM
|
||||||
this.ee.emitEvent('videoElementCreated', [new VideoElementEvent(simVideo, this, 'videoElementCreated')]);
|
this.ee.emitEvent('videoElementCreated', [new VideoElementEvent(simVideo, this, 'videoElementCreated')]);
|
||||||
|
|
||||||
|
// Add streamPlaying event to newly inserted video if necessary
|
||||||
|
this.addPlayEventToFirstVideo();
|
||||||
|
|
||||||
return simVideo;
|
return simVideo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue