forked from lynckia/licode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrtp_media_config_default.js
178 lines (159 loc) · 3.11 KB
/
rtp_media_config_default.js
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
const mediaConfig = {};
const extMappings = [
'urn:ietf:params:rtp-hdrext:ssrc-audio-level',
'http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time',
'urn:ietf:params:rtp-hdrext:toffset',
'urn:3gpp:video-orientation',
// 'http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01',
'http://www.webrtc.org/experiments/rtp-hdrext/playout-delay',
'urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id',
];
const vp8 = {
payloadType: 100,
encodingName: 'VP8',
clockRate: 90000,
channels: 1,
mediaType: 'video',
feedbackTypes: [
'ccm fir',
'nack',
'nack pli',
'goog-remb',
// 'transport-cc',
],
};
const vp9 = {
payloadType: 100,
encodingName: 'VP9',
clockRate: 90000,
channels: 1,
mediaType: 'video',
feedbackTypes: [
'ccm fir',
'nack',
'nack pli',
'goog-remb',
// 'transport-cc',
],
};
const h264 = {
payloadType: 101,
encodingName: 'H264',
clockRate: 90000,
channels: 1,
mediaType: 'video',
formatParameters: {
'profile-level-id': '42e01f',
'level-asymmetry-allowed': '1',
'packetization-mode': '1',
},
feedbackTypes: [
'ccm fir',
'nack',
'nack pli',
'goog-remb',
// 'transport-cc',
],
};
const red = {
payloadType: 116,
encodingName: 'red',
clockRate: 90000,
channels: 1,
mediaType: 'video',
};
const rtx = {
payloadType: 96,
encodingName: 'rtx',
clockRate: 90000,
channels: 1,
mediaType: 'video',
formatParameters: {
apt: '100',
},
};
const ulpfec = {
payloadType: 117,
encodingName: 'ulpfec',
clockRate: 90000,
channels: 1,
mediaType: 'video',
};
const opus = {
payloadType: 111,
encodingName: 'opus',
clockRate: 48000,
channels: 2,
mediaType: 'audio',
};
const isac16 = {
payloadType: 103,
encodingName: 'ISAC',
clockRate: 16000,
channels: 1,
mediaType: 'audio',
};
const isac32 = {
payloadType: 104,
encodingName: 'ISAC',
clockRate: 32000,
channels: 1,
mediaType: 'audio',
};
const pcmu = {
payloadType: 0,
encodingName: 'PCMU',
clockRate: 8000,
channels: 1,
mediaType: 'audio',
};
const pcma = {
payloadType: 8,
encodingName: 'PCMA',
clockRate: 8000,
channels: 1,
mediaType: 'audio',
};
const cn8 = {
payloadType: 13,
encodingName: 'CN',
clockRate: 8000,
channels: 1,
mediaType: 'audio',
};
const cn16 = {
payloadType: 105,
encodingName: 'CN',
clockRate: 16000,
channels: 1,
mediaType: 'audio',
};
const cn32 = {
payloadType: 106,
encodingName: 'CN',
clockRate: 32000,
channels: 1,
mediaType: 'audio',
};
const cn48 = {
payloadType: 107,
encodingName: 'CN',
clockRate: 48000,
channels: 1,
mediaType: 'audio',
};
const telephoneevent = {
payloadType: 126,
encodingName: 'telephone-event',
clockRate: 8000,
channels: 1,
mediaType: 'audio',
};
mediaConfig.codecConfigurations = {
default: { rtpMappings: { vp8, opus }, extMappings },
VP8_AND_OPUS: { rtpMappings: { vp8, opus }, extMappings },
VP9_AND_OPUS: { rtpMappings: { vp9, opus }, extMappings },
H264_AND_OPUS: { rtpMappings: { h264, opus }, extMappings },
};
var module = module || {};
module.exports = mediaConfig;