-
Notifications
You must be signed in to change notification settings - Fork 10
/
FragmentedMuxingInformation.ts
74 lines (64 loc) · 1.96 KB
/
FragmentedMuxingInformation.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import {map, mapArray} from '../common/Mapper';
import MuxingInformationAudioTrack from './MuxingInformationAudioTrack';
import MuxingInformationVideoTrack from './MuxingInformationVideoTrack';
/**
* @export
* @class FragmentedMuxingInformation
*/
export class FragmentedMuxingInformation {
/**
* The mime type of the muxing
* @type {string}
* @memberof FragmentedMuxingInformation
*/
public mimeType?: string;
/**
* The file size of the muxing in bytes
* @type {number}
* @memberof FragmentedMuxingInformation
*/
public fileSize?: number;
/**
* The container format used
* @type {string}
* @memberof FragmentedMuxingInformation
*/
public containerFormat?: string;
/**
* The bitrate of the container if available (tracks + container overhead)
* @type {number}
* @memberof FragmentedMuxingInformation
*/
public containerBitrate?: number;
/**
* The duration of the container in seconds
* @type {number}
* @memberof FragmentedMuxingInformation
*/
public duration?: number;
/**
* Information about the video tracks in the container
* @type {MuxingInformationVideoTrack[]}
* @memberof FragmentedMuxingInformation
*/
public videoTracks?: MuxingInformationVideoTrack[];
/**
* Information about the audio tracks in the container
* @type {MuxingInformationAudioTrack[]}
* @memberof FragmentedMuxingInformation
*/
public audioTracks?: MuxingInformationAudioTrack[];
constructor(obj?: Partial<FragmentedMuxingInformation>) {
if(!obj) {
return;
}
this.mimeType = map(obj.mimeType);
this.fileSize = map(obj.fileSize);
this.containerFormat = map(obj.containerFormat);
this.containerBitrate = map(obj.containerBitrate);
this.duration = map(obj.duration);
this.videoTracks = mapArray(obj.videoTracks, MuxingInformationVideoTrack);
this.audioTracks = mapArray(obj.audioTracks, MuxingInformationAudioTrack);
}
}
export default FragmentedMuxingInformation;