openvidu/openvidu-testapp/src/app/services/test-feed.service.ts

24 lines
445 B
TypeScript
Raw Normal View History

import { Injectable } from '@angular/core';
2018-06-04 14:27:37 +02:00
import { Subject } from 'rxjs';
import { Event } from 'openvidu-browser';
@Injectable()
export class TestFeedService {
lastEvent: Event;
newLastEvent$ = new Subject<any>();
constructor() { }
getLastEvent() {
return this.lastEvent;
}
pushNewEvent(session: string, connection: string, event: Event) {
this.lastEvent = event;
this.newLastEvent$.next(this.lastEvent);
}
}