mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser 'streamCreated' event removed from Publisher
parent
bfe8e61738
commit
a21ecc2c3a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -115,16 +115,6 @@ export class Publisher {
|
|||
});
|
||||
}
|
||||
}
|
||||
if (eventName == 'streamCreated') {
|
||||
if (this.stream.isReady) {
|
||||
this.ee.emitEvent('streamCreated', [{ stream: this.stream }]);
|
||||
} else {
|
||||
this.stream.addEventListener('stream-created-by-publisher', () => {
|
||||
console.warn('Publisher emitting streamCreated');
|
||||
this.ee.emitEvent('streamCreated', [{ stream: this.stream }]);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (eventName == 'accessAllowed') {
|
||||
if (this.stream.accessIsAllowed) {
|
||||
this.ee.emitEvent('accessAllowed');
|
||||
|
|
|
@ -161,7 +161,6 @@ export class SessionInternal {
|
|||
// Adding the remote stream to the OpenVidu object
|
||||
this.openVidu.getRemoteStreams().push(stream);
|
||||
}
|
||||
//}
|
||||
|
||||
callback(undefined);
|
||||
}
|
||||
|
@ -252,13 +251,12 @@ export class SessionInternal {
|
|||
|
||||
onParticipantPublished(options) {
|
||||
|
||||
options.metadata = this.participants[options.id].data;
|
||||
|
||||
// Get the existing Connection created on 'onParticipantJoined' for
|
||||
// existing participants or create a new one for new participants
|
||||
let connection = this.participants[options.id];
|
||||
if (connection) {
|
||||
// Update existing Connection
|
||||
options.metadata = connection.data;
|
||||
connection.options = options;
|
||||
connection.initStreams(options);
|
||||
} else {
|
||||
|
@ -273,7 +271,7 @@ export class SessionInternal {
|
|||
console.debug("Remote Connection found in connections list by its id [" + pid + "]");
|
||||
}
|
||||
|
||||
connection.creationTime = this.participants[pid].creationTime;
|
||||
|
||||
this.participants[pid] = connection;
|
||||
|
||||
this.ee.emitEvent('participant-published', [{ connection }]);
|
||||
|
|
|
@ -295,8 +295,6 @@ export class Stream {
|
|||
this.video = parentElement.appendChild(this.video);
|
||||
}
|
||||
|
||||
this.ee.emitEvent('stream-created-by-publisher');
|
||||
|
||||
this.isReady = true;
|
||||
|
||||
return this.video;
|
||||
|
|
Loading…
Reference in New Issue