mirror of https://github.com/OpenVidu/openvidu.git
openvidu-testapp listens to 'videoElementDestroyed' event of 'Publisher' and 'Subscriber'
parent
33e29b26c3
commit
7d64b242f4
|
@ -92,7 +92,7 @@ mat-radio-button {
|
|||
|
||||
.event-list-div {
|
||||
display: inline-block;
|
||||
width: 125px;
|
||||
width: 130px;
|
||||
height: 183.5px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
|
@ -115,7 +115,7 @@ mat-chip {
|
|||
}
|
||||
|
||||
.scroll-custom::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
width: 5px;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div *ngIf="session.connection" fxLayout>
|
||||
<div fxFlex="135px" class="video-container">
|
||||
<div fxFlex="140px" class="video-container">
|
||||
|
||||
<div class="event-list-div scroll-custom">
|
||||
<mat-accordion [attr.id]="'events-' + session.connection.connectionId" class="event-list">
|
||||
|
@ -121,7 +121,7 @@
|
|||
</mat-accordion>
|
||||
</div>
|
||||
</div>
|
||||
<div [attr.id]="'remote-vid-' + session.connection.connectionId" fxFlex="270px" class="video-container">
|
||||
<div [attr.id]="'remote-vid-' + session.connection.connectionId" fxFlex="240px" class="video-container">
|
||||
<div [attr.id]="'local-vid-' + session.connection.connectionId"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -439,10 +439,10 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy {
|
|||
}
|
||||
}
|
||||
});
|
||||
this.addPublisherEvents(this.publisher);
|
||||
this.session.publish(this.publisher);
|
||||
this.addPublisherEvents(this.publisher);
|
||||
this.session.publish(this.publisher);
|
||||
|
||||
this.publisherChanged = !this.publisherChanged;
|
||||
this.publisherChanged = !this.publisherChanged;
|
||||
}
|
||||
|
||||
subUnsubFromSubscriber(connectionId: string) {
|
||||
|
@ -488,6 +488,9 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy {
|
|||
subscriber.on('videoPlaying', (e) => {
|
||||
this.updateEventList('videoPlaying', e.element.id);
|
||||
});
|
||||
subscriber.on('videoElementDestroyed', (e) => {
|
||||
this.updateEventList('videoElementDestroyed', '(Subscriber)');
|
||||
});
|
||||
this.subscribers[subscriber.stream.connection.connectionId] = { 'subscriber': subscriber, 'subbed': true };
|
||||
}
|
||||
this.updateEventList('streamCreated', event.stream.connection.connectionId);
|
||||
|
@ -559,6 +562,10 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy {
|
|||
publisher.on('streamDestroyed', (e) => {
|
||||
this.updateEventList('streamDestroyed', e.stream.connection.connectionId);
|
||||
});
|
||||
|
||||
publisher.on('videoElementDestroyed', (e) => {
|
||||
this.updateEventList('videoElementDestroyed', '(Publisher)');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue