/
stream.model.ts
51 lines (39 loc) · 1.09 KB
/
stream.model.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Opentok Stream
// https://tokbox.com/developer/sdks/js/reference/Stream.html
import {OTConnection} from "./connection.model";
export class OTStream {
private _stream: any;
constructor(stream: any) {
this._stream = stream;
}
getStream(): any {
return this._stream;
}
getConnection(): OTConnection {
return this._stream ? new OTConnection(this._stream.connection) : null;
}
getCreationTime(): number {
return this._stream ? this._stream.creationTime : null;
}
getFrameRate(): number {
return this._stream ? this._stream.frameRate : null;
}
hasAudio(): boolean {
return this._stream ? this._stream.hasAudio : null;
}
hasVideo(): boolean {
return this._stream ? this._stream.hasVideo : null;
}
getName(): string {
return this._stream ? this._stream.name : null;
}
getStreamId(): string {
return this._stream ? this._stream.streamId : null;
}
getVideoDimensions(): Object {
return this._stream ? this._stream.videoDimensions : null;
}
getVideoType(): string {
return this._stream ? this._stream.videoType : null;
}
}