Sfoglia il codice sorgente

Removes Edge support. (#893)

* Removes Edge support.

* Removes unused dependency.
dev1
Дамян Минков 6 anni fa
parent
commit
158243c297
Nessun account collegato all'indirizzo email del committer

+ 0
- 25
modules/RTC/RTCUtils.js Vedi File

@@ -17,7 +17,6 @@ import * as MediaType from '../../service/RTC/MediaType';
17 17
 import Resolutions from '../../service/RTC/Resolutions';
18 18
 import browser from '../browser';
19 19
 import RTCEvents from '../../service/RTC/RTCEvents';
20
-import ortcRTCPeerConnection from './ortc/RTCPeerConnection';
21 20
 import screenObtainer from './ScreenObtainer';
22 21
 import SDPUtil from '../xmpp/SDPUtil';
23 22
 import Statistics from '../statistics/statistics';
@@ -828,30 +827,6 @@ class RTCUtils extends Listenable {
828 827
                     return this.audioTracks;
829 828
                 };
830 829
             }
831
-        } else if (browser.isEdge()) {
832
-            this.RTCPeerConnectionType = ortcRTCPeerConnection;
833
-
834
-            this.attachMediaStream
835
-                = wrapAttachMediaStream((element, stream) => {
836
-                    defaultSetVideoSrc(element, stream);
837
-                });
838
-
839
-            // ORTC does not generate remote MediaStreams so those are
840
-            // manually created by the ORTC shim. This means that their
841
-            // id (internally generated) does not match the stream id
842
-            // signaled into the remote SDP. Therefore, the shim adds a
843
-            // custom jitsiRemoteId property with the original stream id.
844
-            this.getStreamID = function(stream) {
845
-                const id = stream.jitsiRemoteId || stream.id;
846
-
847
-                return SDPUtil.filterSpecialChars(id);
848
-            };
849
-
850
-            // Remote MediaStreamTracks generated by ORTC (within a
851
-            // RTCRtpReceiver) have an internally/random id which does not match
852
-            // the track id signaled in the remote SDP. The shim adds a custom
853
-            // jitsi-id property with the original track id.
854
-            this.getTrackID = track => track.jitsiRemoteId || track.id;
855 830
         } else {
856 831
             const message = 'Endpoint does not appear to be WebRTC-capable';
857 832
 

+ 0
- 93
modules/RTC/ortc/README.md Vedi File

@@ -1,93 +0,0 @@
1
-# ORTC shim for Edge
2
-
3
-The `modules/RTC/ortc` folder contains a `RTCPeerConnection` shim for Edge based on ORTC among with other shims (such as `RTCSessionDescription`) and some utilities/helpers to deal with both, SDP and ORTC objects.
4
-
5
-
6
-## Files in `ortc` folder
7
-
8
-
9
-### RTCPeerConnection.js
10
-
11
-Exports a `RTCPeerConnection` shim. The interface is based on the [W3C specification of 2015](https://www.w3.org/TR/2015/WD-webrtc-20150210/), which matches (mostly) the current implementation of Chrome.
12
-
13
-It also implements Plan-B for multi-stream.
14
-
15
-
16
-#### Limitations
17
-
18
-* BUNDLE is assumed (single transport for all the local and remote media streams).
19
-* `rtcp-mux` is assumed (not a real problem nowadays).
20
-* Calling `createOffer()` is not implemented, so P2P mode is not supported (`browser.supportsP2P()` returns `false`).
21
-* Calling `setRemoteDescription()` with a SDP answer with mangled SSRC values is currently unsupported (those new SSRC values will not be used for sending media).
22
-* If the app calls `createAnswer()`, mangles SSRC values, and applies by calling `setLocalDescription()`, those new SSRC values are currently ignored.
23
-* Simulcast not supported (currently Edge supports `maxFramerate` per encoding but it does not support `maxBitrate`, `resolutionScale` or `framerateScale`, so it's not worth it).
24
-* `RTCDataChannel` not supported (Edge does not implement it).
25
-* `addIceCandidate()` not supported (it's never called anyway, at least in non P2P mode). Edge does not support Trickle-ICE which means that, after reading all the remote ICE candidates from the remote SDP and applying them, an "empty" candidate must be immediately applied (otherwise the `RTCIceTransport` never enters the "completed" state) and, after that, new remote candidates cannot be added.
26
-
27
-
28
-### RTCSessionDescription.js
29
-
30
-Exports a `RTCSessionDescription` shim.
31
-
32
-The interface is the same as in the WebRTC specification (although internally it also handles a Object representation of the SDP generated by the [sdp-transform](https://www.npmjs.com/package/sdp-transform) library).
33
-
34
-
35
-### errors.js
36
-
37
-Exports some `Error` based classes needed in WebRTC (such as `InvalidStateError`).
38
-
39
-
40
-### utils.js
41
-
42
-Some utilities related to SDP and ORTC.
43
-
44
-
45
-## Issues
46
-
47
-
48
-### ICE error: Wrong MESSAGE-INTEGRITY
49
-
50
-Randomly, ICE Binding Requests from Edge are replied with WRONG MESSAGE-INTEGRITY error by the bridge. It seems that Edge, sometimes, adds a extra byte in the `USERNAME` attribute producing such an issue.
51
-
52
-* GitHub issue: https://github.com/jitsi/lib-jitsi-meet/issues/498
53
-* Edge issue: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12332457/
54
-
55
-
56
-### Wrong VP8 video from Edge to Chrome if ENABLE_VP8_PICID_REWRITING=True
57
-
58
-When VP8 rewriting is enabled in the bridge, VP8 video produced by Edge is wrongly rendered in Chrome/Firefox.
59
-
60
-* GitHub issue: https://github.com/jitsi/lib-jitsi-meet/issues/520
61
-
62
-
63
-### InvalidStateError when calling send() / receive()
64
-
65
-Randomly, sending a new track or receiving a new track fails with `InvalidStateError`. The issue reported in Edge tracker includes a way to reproduce it.
66
-
67
-As per conversations with Edge developers, it seems that Edge has some kind of limitation in the number of VP8 streams it can encode/decode at the same time. However, in my tests I've been able to send a VP8 stream and receive 5 VP8 streams at the same time.
68
-
69
-The problem happens much more often when calling `rtpSender.stop()` or `rtpReceiver.stop()` and then creating a new `RtpSender` or `RtpReceiver` and calling `send()` or `receive()` on it.
70
-
71
-* GitHub issue: https://github.com/jitsi/lib-jitsi-meet/issues/519
72
-* Edge issue: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12459320/
73
-
74
-
75
-### pc.getStats(): no way to get usable and needed stats
76
-
77
-WebRTC stats produced by Edge don't provide enough information to determine resolution, framerate or bitrate.
78
-
79
-* GitHub issue: https://github.com/jitsi/lib-jitsi-meet/issues/523
80
-
81
-
82
-### Device selection does not work
83
-
84
-In Edge, the device selector UI shows grayed drop down lists for mic and webcam.
85
-
86
-* GitHub issue: https://github.com/jitsi/lib-jitsi-meet/issues/530
87
-
88
-
89
-### Other issues in Edge
90
-
91
-Those issues/bugs in Edge do not affect lib-jitsi-meet because the code avoids them. However, for future changes, it's important to consider them:
92
-
93
-* `RtpReceiver.track` returns a different `MediaStreamTrack` every time: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12399497/

+ 0
- 2146
modules/RTC/ortc/RTCPeerConnection.js
File diff soppresso perché troppo grande
Vedi File


+ 0
- 105
modules/RTC/ortc/RTCSessionDescription.js Vedi File

@@ -1,105 +0,0 @@
1
-import sdpTransform from 'sdp-transform';
2
-
3
-/**
4
- * RTCSessionDescription implementation.
5
- */
6
-export default class RTCSessionDescription {
7
-    /**
8
-     * RTCSessionDescription constructor.
9
-     * @param {Object} [data]
10
-     * @param {String} [data.type] - 'offer' / 'answer'.
11
-     * @param {String} [data.sdp] - SDP string.
12
-     * @param {Object} [data._sdpObject] - SDP object generated by the
13
-     * sdp-transform library.
14
-     */
15
-    constructor(data) {
16
-        // @type {String}
17
-        this._sdp = null;
18
-
19
-        // @type {Object}
20
-        this._sdpObject = null;
21
-
22
-        // @type {String}
23
-        this._type = null;
24
-
25
-        switch (data.type) {
26
-        case 'offer':
27
-            break;
28
-        case 'answer':
29
-            break;
30
-        default:
31
-            throw new TypeError(`invalid type "${data.type}"`);
32
-        }
33
-
34
-        this._type = data.type;
35
-
36
-        if (typeof data.sdp === 'string') {
37
-            this._sdp = data.sdp;
38
-            try {
39
-                this._sdpObject = sdpTransform.parse(data.sdp);
40
-            } catch (error) {
41
-                throw new Error(`invalid sdp: ${error}`);
42
-            }
43
-        } else if (typeof data._sdpObject === 'object') {
44
-            this._sdpObject = data._sdpObject;
45
-            try {
46
-                this._sdp = sdpTransform.write(data._sdpObject);
47
-            } catch (error) {
48
-                throw new Error(`invalid sdp object: ${error}`);
49
-            }
50
-        } else {
51
-            throw new TypeError('invalid sdp or _sdpObject');
52
-        }
53
-    }
54
-
55
-    /**
56
-     * Get sdp field.
57
-     * @return {String}
58
-     */
59
-    get sdp() {
60
-        return this._sdp;
61
-    }
62
-
63
-    /**
64
-     * Set sdp field.
65
-     * NOTE: This is not allowed per spec, but lib-jitsi-meet uses it.
66
-     * @param {String} sdp
67
-     */
68
-    set sdp(sdp) {
69
-        try {
70
-            this._sdpObject = sdpTransform.parse(sdp);
71
-        } catch (error) {
72
-            throw new Error(`invalid sdp: ${error}`);
73
-        }
74
-
75
-        this._sdp = sdp;
76
-    }
77
-
78
-    /**
79
-     * Gets the internal sdp object.
80
-     * @return {Object}
81
-     * @private
82
-     */
83
-    get sdpObject() {
84
-        return this._sdpObject;
85
-    }
86
-
87
-    /**
88
-     * Get type field.
89
-     * @return {String}
90
-     */
91
-    get type() {
92
-        return this._type;
93
-    }
94
-
95
-    /**
96
-     * Returns an object with type and sdp fields.
97
-     * @return {Object}
98
-     */
99
-    toJSON() {
100
-        return {
101
-            sdp: this._sdp,
102
-            type: this._type
103
-        };
104
-    }
105
-}

+ 0
- 21
modules/RTC/ortc/errors.js Vedi File

@@ -1,21 +0,0 @@
1
-/**
2
- * Create a class inheriting from Error.
3
- */
4
-function createErrorClass(name) {
5
-    const klass = class extends Error {
6
-        /**
7
-         * Custom error class constructor.
8
-         * @param {string} message
9
-         */
10
-        constructor(message) {
11
-            super(message);
12
-
13
-            // Override `name` property value and make it non enumerable.
14
-            Object.defineProperty(this, 'name', { value: name });
15
-        }
16
-    };
17
-
18
-    return klass;
19
-}
20
-
21
-export const InvalidStateError = createErrorClass('InvalidStateError');

+ 0
- 458
modules/RTC/ortc/utils.js Vedi File

@@ -1,458 +0,0 @@
1
-/* global RTCRtpReceiver */
2
-
3
-import sdpTransform from 'sdp-transform';
4
-
5
-/**
6
- * Extract RTP capabilities from remote description.
7
- * @param {Object} sdpObject - Remote SDP object generated by sdp-transform.
8
- * @return {RTCRtpCapabilities}
9
- */
10
-export function extractCapabilities(sdpObject) {
11
-    // Map of RtpCodecParameters indexed by payload type.
12
-    const codecsMap = new Map();
13
-
14
-    // Array of RtpHeaderExtensions.
15
-    const headerExtensions = [];
16
-
17
-    for (const m of sdpObject.media) {
18
-        // Media kind.
19
-        const kind = m.type;
20
-
21
-        if (kind !== 'audio' && kind !== 'video') {
22
-            continue; // eslint-disable-line no-continue
23
-        }
24
-
25
-        // Get codecs.
26
-        for (const rtp of m.rtp) {
27
-            const codec = {
28
-                clockRate: rtp.rate,
29
-                kind,
30
-                mimeType: `${kind}/${rtp.codec}`,
31
-                name: rtp.codec,
32
-                numChannels: rtp.encoding || 1,
33
-                parameters: {},
34
-                preferredPayloadType: rtp.payload,
35
-                rtcpFeedback: []
36
-            };
37
-
38
-            codecsMap.set(codec.preferredPayloadType, codec);
39
-        }
40
-
41
-        // Get codec parameters.
42
-        for (const fmtp of m.fmtp || []) {
43
-            const parameters = sdpTransform.parseFmtpConfig(fmtp.config);
44
-            const codec = codecsMap.get(fmtp.payload);
45
-
46
-            if (!codec) {
47
-                continue; // eslint-disable-line no-continue
48
-            }
49
-
50
-            codec.parameters = parameters;
51
-        }
52
-
53
-        // Get RTCP feedback for each codec.
54
-        for (const fb of m.rtcpFb || []) {
55
-            const codec = codecsMap.get(fb.payload);
56
-
57
-            if (!codec) {
58
-                continue; // eslint-disable-line no-continue
59
-            }
60
-
61
-            codec.rtcpFeedback.push({
62
-                parameter: fb.subtype || '',
63
-                type: fb.type
64
-            });
65
-        }
66
-
67
-        // Get RTP header extensions.
68
-        for (const ext of m.ext || []) {
69
-            const preferredId = ext.value;
70
-            const uri = ext.uri;
71
-            const headerExtension = {
72
-                kind,
73
-                uri,
74
-                preferredId
75
-            };
76
-
77
-            // Check if already present.
78
-            const duplicated = headerExtensions.find(savedHeaderExtension =>
79
-                headerExtension.kind === savedHeaderExtension.kind
80
-                    && headerExtension.uri === savedHeaderExtension.uri
81
-            );
82
-
83
-            if (!duplicated) {
84
-                headerExtensions.push(headerExtension);
85
-            }
86
-        }
87
-    }
88
-
89
-    return {
90
-        codecs: Array.from(codecsMap.values()),
91
-        fecMechanisms: [], // TODO
92
-        headerExtensions
93
-    };
94
-}
95
-
96
-/**
97
- * Extract DTLS parameters from remote description.
98
- * @param {Object} sdpObject - Remote SDP object generated by sdp-transform.
99
- * @return {RTCDtlsParameters}
100
- */
101
-export function extractDtlsParameters(sdpObject) {
102
-    const media = getFirstActiveMediaSection(sdpObject);
103
-    const fingerprint = media.fingerprint || sdpObject.fingerprint;
104
-    let role;
105
-
106
-    switch (media.setup) {
107
-    case 'active':
108
-        role = 'client';
109
-        break;
110
-    case 'passive':
111
-        role = 'server';
112
-        break;
113
-    case 'actpass':
114
-        role = 'auto';
115
-        break;
116
-    }
117
-
118
-    return {
119
-        role,
120
-        fingerprints: [
121
-            {
122
-                algorithm: fingerprint.type,
123
-                value: fingerprint.hash
124
-            }
125
-        ]
126
-    };
127
-}
128
-
129
-/**
130
- * Extract ICE candidates from remote description.
131
- * NOTE: This implementation assumes a single BUNDLEd transport and rtcp-mux.
132
- * @param {Object} sdpObject - Remote SDP object generated by sdp-transform.
133
- * @return {sequence<RTCIceCandidate>}
134
- */
135
-export function extractIceCandidates(sdpObject) {
136
-    const media = getFirstActiveMediaSection(sdpObject);
137
-    const candidates = [];
138
-
139
-    for (const c of media.candidates) {
140
-        // Ignore RTCP candidates (we assume rtcp-mux).
141
-        if (c.component !== 1) {
142
-            continue; // eslint-disable-line no-continue
143
-        }
144
-
145
-        const candidate = {
146
-            foundation: c.foundation,
147
-            ip: c.ip,
148
-            port: c.port,
149
-            priority: c.priority,
150
-            protocol: c.transport.toLowerCase(),
151
-            type: c.type
152
-        };
153
-
154
-        candidates.push(candidate);
155
-    }
156
-
157
-    return candidates;
158
-}
159
-
160
-/**
161
- * Extract ICE parameters from remote description.
162
- * NOTE: This implementation assumes a single BUNDLEd transport.
163
- * @param {Object} sdpObject - Remote SDP object generated by sdp-transform.
164
- * @return {RTCIceParameters}
165
- */
166
-export function extractIceParameters(sdpObject) {
167
-    const media = getFirstActiveMediaSection(sdpObject);
168
-    const usernameFragment = media.iceUfrag;
169
-    const password = media.icePwd;
170
-    const icelite = sdpObject.icelite === 'ice-lite';
171
-
172
-    return {
173
-        icelite,
174
-        password,
175
-        usernameFragment
176
-    };
177
-}
178
-
179
-/**
180
- * Extract MID values from remote description.
181
- * @param {Object} sdpObject - Remote SDP object generated by sdp-transform.
182
- * @return {map<String, String>} Ordered Map with MID as key and kind as value.
183
- */
184
-export function extractMids(sdpObject) {
185
-    const midToKind = new Map();
186
-
187
-    // Ignore disabled media sections.
188
-    for (const m of sdpObject.media) {
189
-        midToKind.set(m.mid, m.type);
190
-    }
191
-
192
-    return midToKind;
193
-}
194
-
195
-/**
196
- * Extract tracks information.
197
- * @param {Object} sdpObject - Remote SDP object generated by sdp-transform.
198
- * @return {Map}
199
- */
200
-export function extractTrackInfos(sdpObject) {
201
-    // Map with info about receiving media.
202
-    // - index: Media SSRC
203
-    // - value: Object
204
-    //   - kind: 'audio' / 'video'
205
-    //   - ssrc: Media SSRC
206
-    //   - rtxSsrc: RTX SSRC (may be unset)
207
-    //   - streamId: MediaStream.jitsiRemoteId
208
-    //   - trackId: MediaStreamTrack.jitsiRemoteId
209
-    //   - cname: CNAME
210
-    // @type {map<Number, Object>}
211
-    const infos = new Map();
212
-
213
-    // Map with stream SSRC as index and associated RTX SSRC as value.
214
-    // @type {map<Number, Number>}
215
-    const rtxMap = new Map();
216
-
217
-    // Set of RTX SSRC values.
218
-    const rtxSet = new Set();
219
-
220
-    for (const m of sdpObject.media) {
221
-        const kind = m.type;
222
-
223
-        if (kind !== 'audio' && kind !== 'video') {
224
-            continue; // eslint-disable-line no-continue
225
-        }
226
-
227
-        // Get RTX information.
228
-        for (const ssrcGroup of m.ssrcGroups || []) {
229
-            // Just consider FID.
230
-            if (ssrcGroup.semantics !== 'FID') {
231
-                continue; // eslint-disable-line no-continue
232
-            }
233
-
234
-            const ssrcs
235
-                = ssrcGroup.ssrcs.split(' ').map(ssrc => Number(ssrc));
236
-            const ssrc = ssrcs[0];
237
-            const rtxSsrc = ssrcs[1];
238
-
239
-            rtxMap.set(ssrc, rtxSsrc);
240
-            rtxSet.add(rtxSsrc);
241
-        }
242
-
243
-        for (const ssrcObject of m.ssrcs || []) {
244
-            const ssrc = ssrcObject.id;
245
-
246
-            // Ignore RTX.
247
-            if (rtxSet.has(ssrc)) {
248
-                continue; // eslint-disable-line no-continue
249
-            }
250
-
251
-            let info = infos.get(ssrc);
252
-
253
-            if (!info) {
254
-                info = {
255
-                    kind,
256
-                    rtxSsrc: rtxMap.get(ssrc),
257
-                    ssrc
258
-                };
259
-
260
-                infos.set(ssrc, info);
261
-            }
262
-
263
-            switch (ssrcObject.attribute) {
264
-            case 'cname': {
265
-                info.cname = ssrcObject.value;
266
-                break;
267
-            }
268
-            case 'msid': {
269
-                const values = ssrcObject.value.split(' ');
270
-                const streamId = values[0];
271
-                const trackId = values[1];
272
-
273
-                info.streamId = streamId;
274
-                info.trackId = trackId;
275
-                break;
276
-            }
277
-            case 'mslabel': {
278
-                const streamId = ssrcObject.value;
279
-
280
-                info.streamId = streamId;
281
-                break;
282
-            }
283
-            case 'label': {
284
-                const trackId = ssrcObject.value;
285
-
286
-                info.trackId = trackId;
287
-                break;
288
-            }
289
-            }
290
-        }
291
-    }
292
-
293
-    return infos;
294
-}
295
-
296
-/**
297
- * Get local ORTC RTP capabilities filtered and adapted to the given remote RTP
298
- * capabilities.
299
- * @param {RTCRtpCapabilities} filterWithCapabilities - RTP capabilities to
300
- * filter with.
301
- * @return {RTCRtpCapabilities}
302
- */
303
-export function getLocalCapabilities(filterWithCapabilities) {
304
-    const localFullCapabilities = RTCRtpReceiver.getCapabilities();
305
-    const localCapabilities = {
306
-        codecs: [],
307
-        fecMechanisms: [],
308
-        headerExtensions: []
309
-    };
310
-
311
-    // Map of RTX and codec payloads.
312
-    // - index: Codec payloadType
313
-    // - value: Associated RTX payloadType
314
-    // @type {map<Number, Number>}
315
-    const remoteRtxMap = new Map();
316
-
317
-    // Set codecs.
318
-    for (const remoteCodec of filterWithCapabilities.codecs) {
319
-        const remoteCodecName = remoteCodec.name.toLowerCase();
320
-
321
-        if (remoteCodecName === 'rtx') {
322
-            remoteRtxMap.set(
323
-                remoteCodec.parameters.apt, remoteCodec.preferredPayloadType);
324
-
325
-            continue; // eslint-disable-line no-continue
326
-        }
327
-
328
-        const localCodec = localFullCapabilities.codecs.find(codec =>
329
-            codec.name.toLowerCase() === remoteCodecName
330
-                && codec.kind === remoteCodec.kind
331
-                && codec.clockRate === remoteCodec.clockRate
332
-        );
333
-
334
-        if (!localCodec) {
335
-            continue; // eslint-disable-line no-continue
336
-        }
337
-
338
-        const codec = {
339
-            clockRate: localCodec.clockRate,
340
-            kind: localCodec.kind,
341
-            mimeType: `${localCodec.kind}/${localCodec.name}`,
342
-            name: localCodec.name,
343
-            numChannels: localCodec.numChannels || 1,
344
-            parameters: {},
345
-            preferredPayloadType: remoteCodec.preferredPayloadType,
346
-            rtcpFeedback: []
347
-        };
348
-
349
-        for (const remoteParamName of Object.keys(remoteCodec.parameters)) {
350
-            const remoteParamValue
351
-                = remoteCodec.parameters[remoteParamName];
352
-
353
-            for (const localParamName of Object.keys(localCodec.parameters)) {
354
-                const localParamValue
355
-                    = localCodec.parameters[localParamName];
356
-
357
-                if (localParamName !== remoteParamName) {
358
-                    continue; // eslint-disable-line no-continue
359
-                }
360
-
361
-                // TODO: We should consider much more cases here, but Edge
362
-                // does not support many codec parameters.
363
-                if (localParamValue === remoteParamValue) {
364
-                    // Use this RTP parameter.
365
-                    codec.parameters[localParamName] = localParamValue;
366
-                    break;
367
-                }
368
-            }
369
-        }
370
-
371
-        for (const remoteFb of remoteCodec.rtcpFeedback) {
372
-            const localFb = localCodec.rtcpFeedback.find(fb =>
373
-                fb.type === remoteFb.type
374
-                    && fb.parameter === remoteFb.parameter
375
-            );
376
-
377
-            if (localFb) {
378
-                // Use this RTCP feedback.
379
-                codec.rtcpFeedback.push(localFb);
380
-            }
381
-        }
382
-
383
-        // Use this codec.
384
-        localCapabilities.codecs.push(codec);
385
-    }
386
-
387
-    // Add RTX for video codecs.
388
-    for (const codec of localCapabilities.codecs) {
389
-        const payloadType = codec.preferredPayloadType;
390
-
391
-        if (!remoteRtxMap.has(payloadType)) {
392
-            continue; // eslint-disable-line no-continue
393
-        }
394
-
395
-        const rtxCodec = {
396
-            clockRate: codec.clockRate,
397
-            kind: codec.kind,
398
-            mimeType: `${codec.kind}/rtx`,
399
-            name: 'rtx',
400
-            parameters: {
401
-                apt: payloadType
402
-            },
403
-            preferredPayloadType: remoteRtxMap.get(payloadType),
404
-            rtcpFeedback: []
405
-        };
406
-
407
-        // Add RTX codec.
408
-        localCapabilities.codecs.push(rtxCodec);
409
-    }
410
-
411
-    // Add RTP header extensions.
412
-    for (const remoteExtension of filterWithCapabilities.headerExtensions) {
413
-        const localExtension
414
-            = localFullCapabilities.headerExtensions.find(extension =>
415
-                extension.kind === remoteExtension.kind
416
-                    && extension.uri === remoteExtension.uri
417
-            );
418
-
419
-        if (localExtension) {
420
-            const extension = {
421
-                kind: localExtension.kind,
422
-                preferredEncrypt: Boolean(remoteExtension.preferredEncrypt),
423
-                preferredId: remoteExtension.preferredId,
424
-                uri: localExtension.uri
425
-            };
426
-
427
-            // Use this RTP header extension.
428
-            localCapabilities.headerExtensions.push(extension);
429
-        }
430
-    }
431
-
432
-    // Add FEC mechanisms.
433
-    // NOTE: We don't support FEC yet and, in fact, neither does Edge.
434
-    for (const remoteFecMechanism of filterWithCapabilities.fecMechanisms) {
435
-        const localFecMechanism
436
-            = localFullCapabilities.fecMechanisms.find(fec =>
437
-                fec === remoteFecMechanism
438
-            );
439
-
440
-        if (localFecMechanism) {
441
-            // Use this FEC mechanism.
442
-            localCapabilities.fecMechanisms.push(localFecMechanism);
443
-        }
444
-    }
445
-
446
-    return localCapabilities;
447
-}
448
-
449
-/**
450
- * Get the first acive media section.
451
- * @param {Object} sdpObject - SDP object generated by sdp-transform.
452
- * @return {Object} SDP media section as parsed by sdp-transform.
453
- */
454
-function getFirstActiveMediaSection(sdpObject) {
455
-    return sdpObject.media.find(m =>
456
-        m.iceUfrag && m.port !== 0
457
-    );
458
-}

+ 0
- 1
modules/browser/BrowserCapabilities.js Vedi File

@@ -95,7 +95,6 @@ export default class BrowserCapabilities extends BrowserDetection {
95 95
      */
96 96
     isSupported() {
97 97
         return this.isChromiumBased()
98
-            || this.isEdge()
99 98
             || this.isFirefox()
100 99
             || this.isReactNative()
101 100
             || this.isSafariWithWebrtc();

+ 13
- 41
package-lock.json Vedi File

@@ -3673,8 +3673,7 @@
3673 3673
         "ansi-regex": {
3674 3674
           "version": "2.1.1",
3675 3675
           "bundled": true,
3676
-          "dev": true,
3677
-          "optional": true
3676
+          "dev": true
3678 3677
         },
3679 3678
         "aproba": {
3680 3679
           "version": "1.2.0",
@@ -3695,14 +3694,12 @@
3695 3694
         "balanced-match": {
3696 3695
           "version": "1.0.0",
3697 3696
           "bundled": true,
3698
-          "dev": true,
3699
-          "optional": true
3697
+          "dev": true
3700 3698
         },
3701 3699
         "brace-expansion": {
3702 3700
           "version": "1.1.11",
3703 3701
           "bundled": true,
3704 3702
           "dev": true,
3705
-          "optional": true,
3706 3703
           "requires": {
3707 3704
             "balanced-match": "^1.0.0",
3708 3705
             "concat-map": "0.0.1"
@@ -3717,20 +3714,17 @@
3717 3714
         "code-point-at": {
3718 3715
           "version": "1.1.0",
3719 3716
           "bundled": true,
3720
-          "dev": true,
3721
-          "optional": true
3717
+          "dev": true
3722 3718
         },
3723 3719
         "concat-map": {
3724 3720
           "version": "0.0.1",
3725 3721
           "bundled": true,
3726
-          "dev": true,
3727
-          "optional": true
3722
+          "dev": true
3728 3723
         },
3729 3724
         "console-control-strings": {
3730 3725
           "version": "1.1.0",
3731 3726
           "bundled": true,
3732
-          "dev": true,
3733
-          "optional": true
3727
+          "dev": true
3734 3728
         },
3735 3729
         "core-util-is": {
3736 3730
           "version": "1.0.2",
@@ -3847,8 +3841,7 @@
3847 3841
         "inherits": {
3848 3842
           "version": "2.0.3",
3849 3843
           "bundled": true,
3850
-          "dev": true,
3851
-          "optional": true
3844
+          "dev": true
3852 3845
         },
3853 3846
         "ini": {
3854 3847
           "version": "1.3.5",
@@ -3860,7 +3853,6 @@
3860 3853
           "version": "1.0.0",
3861 3854
           "bundled": true,
3862 3855
           "dev": true,
3863
-          "optional": true,
3864 3856
           "requires": {
3865 3857
             "number-is-nan": "^1.0.0"
3866 3858
           }
@@ -3875,7 +3867,6 @@
3875 3867
           "version": "3.0.4",
3876 3868
           "bundled": true,
3877 3869
           "dev": true,
3878
-          "optional": true,
3879 3870
           "requires": {
3880 3871
             "brace-expansion": "^1.1.7"
3881 3872
           }
@@ -3883,14 +3874,12 @@
3883 3874
         "minimist": {
3884 3875
           "version": "0.0.8",
3885 3876
           "bundled": true,
3886
-          "dev": true,
3887
-          "optional": true
3877
+          "dev": true
3888 3878
         },
3889 3879
         "minipass": {
3890 3880
           "version": "2.2.4",
3891 3881
           "bundled": true,
3892 3882
           "dev": true,
3893
-          "optional": true,
3894 3883
           "requires": {
3895 3884
             "safe-buffer": "^5.1.1",
3896 3885
             "yallist": "^3.0.0"
@@ -3909,7 +3898,6 @@
3909 3898
           "version": "0.5.1",
3910 3899
           "bundled": true,
3911 3900
           "dev": true,
3912
-          "optional": true,
3913 3901
           "requires": {
3914 3902
             "minimist": "0.0.8"
3915 3903
           }
@@ -3990,8 +3978,7 @@
3990 3978
         "number-is-nan": {
3991 3979
           "version": "1.0.1",
3992 3980
           "bundled": true,
3993
-          "dev": true,
3994
-          "optional": true
3981
+          "dev": true
3995 3982
         },
3996 3983
         "object-assign": {
3997 3984
           "version": "4.1.1",
@@ -4003,7 +3990,6 @@
4003 3990
           "version": "1.4.0",
4004 3991
           "bundled": true,
4005 3992
           "dev": true,
4006
-          "optional": true,
4007 3993
           "requires": {
4008 3994
             "wrappy": "1"
4009 3995
           }
@@ -4089,8 +4075,7 @@
4089 4075
         "safe-buffer": {
4090 4076
           "version": "5.1.1",
4091 4077
           "bundled": true,
4092
-          "dev": true,
4093
-          "optional": true
4078
+          "dev": true
4094 4079
         },
4095 4080
         "safer-buffer": {
4096 4081
           "version": "2.1.2",
@@ -4126,7 +4111,6 @@
4126 4111
           "version": "1.0.2",
4127 4112
           "bundled": true,
4128 4113
           "dev": true,
4129
-          "optional": true,
4130 4114
           "requires": {
4131 4115
             "code-point-at": "^1.0.0",
4132 4116
             "is-fullwidth-code-point": "^1.0.0",
@@ -4146,7 +4130,6 @@
4146 4130
           "version": "3.0.1",
4147 4131
           "bundled": true,
4148 4132
           "dev": true,
4149
-          "optional": true,
4150 4133
           "requires": {
4151 4134
             "ansi-regex": "^2.0.0"
4152 4135
           }
@@ -4190,14 +4173,12 @@
4190 4173
         "wrappy": {
4191 4174
           "version": "1.0.2",
4192 4175
           "bundled": true,
4193
-          "dev": true,
4194
-          "optional": true
4176
+          "dev": true
4195 4177
         },
4196 4178
         "yallist": {
4197 4179
           "version": "3.0.2",
4198 4180
           "bundled": true,
4199
-          "dev": true,
4200
-          "optional": true
4181
+          "dev": true
4201 4182
         }
4202 4183
       }
4203 4184
     },
@@ -5352,14 +5333,12 @@
5352 5333
             "balanced-match": {
5353 5334
               "version": "1.0.0",
5354 5335
               "bundled": true,
5355
-              "dev": true,
5356
-              "optional": true
5336
+              "dev": true
5357 5337
             },
5358 5338
             "brace-expansion": {
5359 5339
               "version": "1.1.11",
5360 5340
               "bundled": true,
5361 5341
               "dev": true,
5362
-              "optional": true,
5363 5342
               "requires": {
5364 5343
                 "balanced-match": "^1.0.0",
5365 5344
                 "concat-map": "0.0.1"
@@ -5379,8 +5358,7 @@
5379 5358
             "concat-map": {
5380 5359
               "version": "0.0.1",
5381 5360
               "bundled": true,
5382
-              "dev": true,
5383
-              "optional": true
5361
+              "dev": true
5384 5362
             },
5385 5363
             "console-control-strings": {
5386 5364
               "version": "1.1.0",
@@ -5528,7 +5506,6 @@
5528 5506
               "version": "3.0.4",
5529 5507
               "bundled": true,
5530 5508
               "dev": true,
5531
-              "optional": true,
5532 5509
               "requires": {
5533 5510
                 "brace-expansion": "^1.1.7"
5534 5511
               }
@@ -9177,11 +9154,6 @@
9177 9154
       "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
9178 9155
       "dev": true
9179 9156
     },
9180
-    "yaeti": {
9181
-      "version": "1.0.1",
9182
-      "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-1.0.1.tgz",
9183
-      "integrity": "sha1-IX0Eu83LvYbMR45GVapMKMST3r8="
9184
-    },
9185 9157
     "yallist": {
9186 9158
       "version": "2.1.2",
9187 9159
       "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",

+ 1
- 2
package.json Vedi File

@@ -26,8 +26,7 @@
26 26
     "sdp-transform": "2.3.0",
27 27
     "strophe.js": "1.2.16",
28 28
     "strophejs-plugin-disco": "0.0.2",
29
-    "webrtc-adapter": "github:webrtc/adapter#1eec19782b4058d186341263e7d049cea3e3290a",
30
-    "yaeti": "1.0.1"
29
+    "webrtc-adapter": "github:webrtc/adapter#1eec19782b4058d186341263e7d049cea3e3290a"
31 30
   },
32 31
   "devDependencies": {
33 32
     "@babel/core": "7.1.2",

Loading…
Annulla
Salva