mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser BUG FIX: own remote subscription could launch streamPlaying event twice
parent
7dac3e8378
commit
c97a29fd50
|
@ -230,8 +230,6 @@ export class StreamManager implements EventDispatcher {
|
||||||
|
|
||||||
let returnNumber = 1;
|
let returnNumber = 1;
|
||||||
|
|
||||||
this.initializeVideoProperties(video);
|
|
||||||
|
|
||||||
for (const streamManager of this.stream.session.streamManagers) {
|
for (const streamManager of this.stream.session.streamManagers) {
|
||||||
if (streamManager.disassociateVideo(video)) {
|
if (streamManager.disassociateVideo(video)) {
|
||||||
returnNumber = -1;
|
returnNumber = -1;
|
||||||
|
@ -321,7 +319,10 @@ export class StreamManager implements EventDispatcher {
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
initializeVideoProperties(video: HTMLVideoElement): void {
|
initializeVideoProperties(video: HTMLVideoElement): void {
|
||||||
video.srcObject = this.stream.getMediaStream();
|
if (!(this.stream.isLocal() && this.stream.displayMyRemote())) {
|
||||||
|
// Avoid setting the MediaStream into the srcObject if remote subscription before publishing
|
||||||
|
video.srcObject = this.stream.getMediaStream();
|
||||||
|
}
|
||||||
video.autoplay = true;
|
video.autoplay = true;
|
||||||
video.controls = false;
|
video.controls = false;
|
||||||
if (!video.id) {
|
if (!video.id) {
|
||||||
|
|
Loading…
Reference in New Issue