Sharkey/src/web/app/common/scripts/streaming/home-stream-manager.ts

24 lines
453 B
TypeScript
Raw Normal View History

2017-11-16 23:46:36 +09:00
import StreamManager from './stream-manager';
2017-11-17 01:24:44 +09:00
import Connection from './home-stream';
2018-02-26 19:23:53 +09:00
import MiOS from '../../mios';
2017-11-16 23:46:36 +09:00
2017-11-17 01:24:44 +09:00
export default class HomeStreamManager extends StreamManager<Connection> {
2017-11-16 23:46:36 +09:00
private me;
2018-02-26 19:23:53 +09:00
private os: MiOS;
2017-11-16 23:46:36 +09:00
2018-02-26 19:23:53 +09:00
constructor(os: MiOS, me) {
2017-11-16 23:46:36 +09:00
super();
this.me = me;
2018-02-26 19:23:53 +09:00
this.os = os;
2017-11-16 23:46:36 +09:00
}
public getConnection() {
if (this.connection == null) {
2018-02-26 19:23:53 +09:00
this.connection = new Connection(this.os, this.me);
2017-11-16 23:46:36 +09:00
}
return this.connection;
}
}