Ver código fonte

[iOS] Synthesize IPv6 addresses

j8
Lyubomir Marinov 8 anos atrás
pai
commit
9f332ffcec

+ 4
- 0
ios/app/POSIX.h Ver arquivo

@@ -0,0 +1,4 @@
1
+#import "RCTBridgeModule.h"
2
+
3
+@interface POSIX : NSObject<RCTBridgeModule>
4
+@end

+ 63
- 0
ios/app/POSIX.m Ver arquivo

@@ -0,0 +1,63 @@
1
+#import "POSIX.h"
2
+
3
+#include <arpa/inet.h>
4
+#include <netdb.h>
5
+#include <sys/types.h>
6
+#include <sys/socket.h>
7
+
8
+@implementation POSIX
9
+
10
+RCT_EXPORT_MODULE();
11
+
12
+RCT_EXPORT_METHOD(getaddrinfo:(NSString *)hostname
13
+                      resolve:(RCTPromiseResolveBlock)resolve
14
+                       reject:(RCTPromiseRejectBlock)reject) {
15
+    int err;
16
+    struct addrinfo *res;
17
+    NSString *rejectCode;
18
+
19
+    if (0 == (err = getaddrinfo(hostname.UTF8String, NULL, NULL, &res))) {
20
+        int af = res->ai_family;
21
+        struct sockaddr *sa = res->ai_addr;
22
+        void *addr;
23
+
24
+        switch (af) {
25
+        case AF_INET:
26
+            addr = &(((struct sockaddr_in *) sa)->sin_addr);
27
+            break;
28
+        case AF_INET6:
29
+            addr = &(((struct sockaddr_in6 *) sa)->sin6_addr);
30
+            break;
31
+        default:
32
+            addr = NULL;
33
+            break;
34
+        }
35
+        if (addr) {
36
+            char v[MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN)];
37
+
38
+            if (inet_ntop(af, addr, v, sizeof(v))) {
39
+                resolve([NSString stringWithUTF8String:v]);
40
+            } else {
41
+                err = errno;
42
+                rejectCode = @"inet_ntop";
43
+            }
44
+        } else {
45
+            err = EAFNOSUPPORT;
46
+            rejectCode = @"EAFNOSUPPORT";
47
+        }
48
+
49
+        freeaddrinfo(res);
50
+    } else {
51
+        rejectCode = @"getaddrinfo";
52
+    }
53
+    if (0 != err) {
54
+        NSError *error
55
+            = [NSError errorWithDomain:NSPOSIXErrorDomain
56
+                  code:err
57
+                  userInfo:nil];
58
+
59
+        reject(rejectCode, error.localizedDescription, error);
60
+    }
61
+}
62
+
63
+@end

+ 6
- 0
ios/jitsi-meet-react.xcodeproj/project.pbxproj Ver arquivo

@@ -26,6 +26,7 @@
26 26
 		832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
27 27
 		B30EF2311DC0ED7C00690F45 /* WebRTC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B30EF2301DC0ED7C00690F45 /* WebRTC.framework */; };
28 28
 		B30EF2331DC0EEA500690F45 /* WebRTC.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B30EF2301DC0ED7C00690F45 /* WebRTC.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
29
+		B3A9D0251E0481E10009343D /* POSIX.m in Sources */ = {isa = PBXBuildFile; fileRef = B3A9D0241E0481E10009343D /* POSIX.m */; };
29 30
 		BF9643821C34FBB300B0BBDF /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF9643811C34FBB300B0BBDF /* AVFoundation.framework */; };
30 31
 		BF9643841C34FBBB00B0BBDF /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF9643831C34FBBB00B0BBDF /* AudioToolbox.framework */; };
31 32
 		BF9643861C34FBC100B0BBDF /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF9643851C34FBC100B0BBDF /* CoreGraphics.framework */; };
@@ -212,6 +213,8 @@
212 213
 		821D8ABD506944B4BDBB069B /* libRNVectorIcons.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNVectorIcons.a; sourceTree = "<group>"; };
213 214
 		832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
214 215
 		B30EF2301DC0ED7C00690F45 /* WebRTC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebRTC.framework; path = "../node_modules/react-native-webrtc/ios/WebRTC.framework"; sourceTree = "<group>"; };
216
+		B3A9D0231E0481E10009343D /* POSIX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = POSIX.h; path = app/POSIX.h; sourceTree = "<group>"; };
217
+		B3A9D0241E0481E10009343D /* POSIX.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = POSIX.m; path = app/POSIX.m; sourceTree = "<group>"; };
215 218
 		B3B083EB1D4955FF0069CEE7 /* jitsi-meet-react.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "jitsi-meet-react.entitlements"; sourceTree = "<group>"; };
216 219
 		B96AF9B6FBC0453798399985 /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = "<group>"; };
217 220
 		BF9643811C34FBB300B0BBDF /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
@@ -331,6 +334,8 @@
331 334
 				13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
332 335
 				008F07F21AC5B25A0029DE68 /* main.jsbundle */,
333 336
 				13B07FB71A68108700A75B9A /* main.m */,
337
+				B3A9D0231E0481E10009343D /* POSIX.h */,
338
+				B3A9D0241E0481E10009343D /* POSIX.m */,
334 339
 			);
335 340
 			name = app;
336 341
 			sourceTree = "<group>";
@@ -755,6 +760,7 @@
755 760
 			isa = PBXSourcesBuildPhase;
756 761
 			buildActionMask = 2147483647;
757 762
 			files = (
763
+				B3A9D0251E0481E10009343D /* POSIX.m in Sources */,
758 764
 				13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
759 765
 				13B07FC11A68108700A75B9A /* main.m in Sources */,
760 766
 			);

+ 317
- 0
react/features/base/lib-jitsi-meet/native/RTCPeerConnection.js Ver arquivo

@@ -0,0 +1,317 @@
1
+import { Platform } from 'react-native';
2
+import {
3
+    RTCPeerConnection,
4
+    RTCSessionDescription
5
+} from 'react-native-webrtc';
6
+
7
+import { POSIX } from '../../react-native';
8
+
9
+// XXX At the time of this writing extending RTCPeerConnection using ES6 'class'
10
+// and 'extends' causes a runtime error related to the attempt to define the
11
+// onaddstream property setter. The error mentions that babelHelpers.set is
12
+// undefined which appears to be a thing inside React Native's packager. As a
13
+// workaround, extend using the pre-ES6 way.
14
+
15
+/**
16
+ * The RTCPeerConnection provided by react-native-webrtc fires onaddstream
17
+ * before it remembers remotedescription (and thus makes it available to API
18
+ * clients). Because that appears to be a problem for lib-jitsi-meet which has
19
+ * been successfully running on Chrome, Firefox, Temasys, etc. for a very long
20
+ * time, attempt to meets its expectations (by extending RTCPPeerConnection).
21
+ *
22
+ * @class
23
+ */
24
+export default function _RTCPeerConnection(...args) {
25
+
26
+    /* eslint-disable no-invalid-this */
27
+
28
+    RTCPeerConnection.apply(this, args);
29
+
30
+    this.onaddstream = (...args) => // eslint-disable-line no-shadow
31
+        (this._onaddstreamQueue
32
+                ? this._queueOnaddstream
33
+                : this._invokeOnaddstream)
34
+            .apply(this, args);
35
+
36
+    // Shadow RTCPeerConnection's onaddstream but after _RTCPeerConnection has
37
+    // assigned to the property in question. Defining the property on
38
+    // _RTCPeerConnection's prototype may (or may not, I don't know) work but I
39
+    // don't want to try because the following approach appears to work and I
40
+    // understand it.
41
+    Object.defineProperty(this, 'onaddstream', {
42
+        configurable: true,
43
+        enumerable: true,
44
+        get() {
45
+            return this._onaddstream;
46
+        },
47
+        set(value) {
48
+            this._onaddstream = value;
49
+        }
50
+    });
51
+
52
+    /* eslint-enable no-invalid-this */
53
+}
54
+
55
+_RTCPeerConnection.prototype = Object.create(RTCPeerConnection.prototype);
56
+_RTCPeerConnection.prototype.constructor = _RTCPeerConnection;
57
+
58
+_RTCPeerConnection.prototype._invokeOnaddstream = function(...args) {
59
+    const onaddstream = this._onaddstream;
60
+
61
+    return onaddstream && onaddstream.apply(this, args);
62
+};
63
+
64
+_RTCPeerConnection.prototype._invokeQueuedOnaddstream = function(q) {
65
+    q && q.forEach(args => {
66
+        try {
67
+            this._invokeOnaddstream(...args);
68
+        } catch (e) {
69
+            // TODO Determine whether the combination of the standard
70
+            // setRemoteDescription and onaddstream results in a similar
71
+            // swallowing of errors.
72
+            _LOGE(e);
73
+        }
74
+    });
75
+};
76
+
77
+_RTCPeerConnection.prototype._queueOnaddstream = function(...args) {
78
+    this._onaddstreamQueue.push(Array.from(args));
79
+};
80
+
81
+_RTCPeerConnection.prototype.setRemoteDescription = function(
82
+        sessionDescription,
83
+        successCallback,
84
+        errorCallback) {
85
+    // If the deprecated callback-based version is used, translate it to the
86
+    // Promise-based version.
87
+    if (typeof successCallback !== 'undefined'
88
+            || typeof errorCallback !== 'undefined') {
89
+        // XXX Returning a Promise is not necessary. But I don't see why it'd
90
+        // hurt (much).
91
+        return (
92
+            _RTCPeerConnection.prototype.setRemoteDescription.call(
93
+                    this,
94
+                    sessionDescription)
95
+                .then(successCallback, errorCallback));
96
+    }
97
+
98
+    return (
99
+        _synthesizeIPv6Addresses(sessionDescription)
100
+            .catch(reason => {
101
+                reason && _LOGE(reason);
102
+
103
+                return sessionDescription;
104
+            })
105
+            .then(value => _setRemoteDescription.bind(this)(value)));
106
+
107
+};
108
+
109
+/**
110
+ * Logs at error level.
111
+ *
112
+ * @returns {void}
113
+ */
114
+function _LOGE(...args) {
115
+    console && console.error && console.error(...args);
116
+}
117
+
118
+/**
119
+ * Adapts react-native-webrtc's {@link RTCPeerConnection#setRemoteDescription}
120
+ * implementation which uses the deprecated, callback-based version to the
121
+ * <tt>Promise</tt>-based version.
122
+ *
123
+ * @param {RTCSessionDescription} sessionDescription - The RTCSessionDescription
124
+ * which specifies the configuration of the remote end of the connection.
125
+ * @returns {Promise}
126
+ */
127
+function _setRemoteDescription(sessionDescription) {
128
+    return new Promise((resolve, reject) => {
129
+
130
+        /* eslint-disable no-invalid-this */
131
+
132
+        // Ensure I'm not remembering onaddstream invocations from previous
133
+        // setRemoteDescription calls. I shouldn't be but... anyway.
134
+        this._onaddstreamQueue = [];
135
+
136
+        RTCPeerConnection.prototype.setRemoteDescription.call(
137
+            this,
138
+            sessionDescription,
139
+            (...args) => {
140
+                let q;
141
+
142
+                try {
143
+                    resolve(...args);
144
+                } finally {
145
+                    q = this._onaddstreamQueue;
146
+                    this._onaddstreamQueue = undefined;
147
+                }
148
+
149
+                this._invokeQueuedOnaddstream(q);
150
+            },
151
+            (...args) => {
152
+                this._onaddstreamQueue = undefined;
153
+
154
+                reject(...args);
155
+            });
156
+
157
+        /* eslint-enable no-invalid-this */
158
+    });
159
+}
160
+
161
+/**
162
+ * Synthesize IPv6 addresses on iOS in order to support IPv6 NAT64 networks.
163
+ *
164
+ * @param {RTCSessionDescription} sdp - The RTCSessionDescription which
165
+ * specifies the configuration of the remote end of the connection.
166
+ * @returns {Promise}
167
+ */
168
+function _synthesizeIPv6Addresses(sdp) {
169
+    // The synthesis of IPv6 addresses is implemented on iOS only at the time of
170
+    // this writing.
171
+    if (Platform.OS !== 'ios') {
172
+        return Promise.resolve(sdp);
173
+    }
174
+
175
+    return (
176
+        new Promise(resolve => resolve(_synthesizeIPv6Addresses0(sdp)))
177
+            .then(({ ips, lines }) =>
178
+                Promise.all(Array.from(ips.values()))
179
+                    .then(() => _synthesizeIPv6Addresses1(sdp, ips, lines))
180
+            ));
181
+}
182
+
183
+/* eslint-disable max-depth */
184
+
185
+/**
186
+ * Implements the initial phase of the synthesis of IPv6 addresses.
187
+ *
188
+ * @param {RTCSessionDescription} sessionDescription - The RTCSessionDescription
189
+ * for which IPv6 addresses will be synthesized.
190
+ * @returns {{
191
+ *     ips: Map,
192
+ *     lines: Array
193
+ * }}
194
+ */
195
+function _synthesizeIPv6Addresses0(sessionDescription) {
196
+    const sdp = sessionDescription.sdp;
197
+    let start = 0;
198
+    const lines = [];
199
+    const ips = new Map();
200
+
201
+    do {
202
+        const end = sdp.indexOf('\r\n', start);
203
+        let line;
204
+
205
+        if (end === -1) {
206
+            line = sdp.substring(start);
207
+
208
+            // Break out of the loop at the end of the iteration.
209
+            start = undefined;
210
+        } else {
211
+            line = sdp.substring(start, end);
212
+            start = end + 2;
213
+        }
214
+
215
+        if (line.startsWith('a=candidate:')) {
216
+            const candidate = line.split(' ');
217
+
218
+            if (candidate.length >= 10 && candidate[6] === 'typ') {
219
+                const ip4s = [ candidate[4] ];
220
+                let abort = false;
221
+
222
+                for (let i = 8; i < candidate.length; ++i) {
223
+                    if (candidate[i] === 'raddr') {
224
+                        ip4s.push(candidate[++i]);
225
+                        break;
226
+                    }
227
+                }
228
+
229
+                for (const ip of ip4s) {
230
+                    if (ip.indexOf(':') === -1) {
231
+                        ips.has(ip)
232
+                            || ips.set(ip, new Promise((resolve, reject) => {
233
+                                const v = ips.get(ip);
234
+
235
+                                if (v && typeof v === 'string') {
236
+                                    resolve(v);
237
+                                } else {
238
+                                    POSIX.getaddrinfo(ip).then(
239
+                                        value => {
240
+                                            if (value.indexOf(':') === -1
241
+                                                    || value === ips.get(ip)) {
242
+                                                ips.delete(ip);
243
+                                            } else {
244
+                                                ips.set(ip, value);
245
+                                            }
246
+                                            resolve(value);
247
+                                        },
248
+                                        reject);
249
+                                }
250
+                            }));
251
+                    } else {
252
+                        abort = true;
253
+                        break;
254
+                    }
255
+                }
256
+                if (abort) {
257
+                    ips.clear();
258
+                    break;
259
+                }
260
+
261
+                line = candidate;
262
+            }
263
+        }
264
+
265
+        lines.push(line);
266
+    } while (start);
267
+
268
+    return {
269
+        ips,
270
+        lines
271
+    };
272
+}
273
+
274
+/* eslint-enable max-depth */
275
+
276
+/**
277
+ * Implements the initial phase of the synthesis of IPv6 addresses.
278
+ *
279
+ * @param {RTCSessionDescription} sessionDescription - The RTCSessionDescription
280
+ * for which IPv6 addresses are being synthesized.
281
+ * @param {Map} ips - A Map of IPv4 addresses found in the specified
282
+ * sessionDescription to synthesized IPv6 addresses.
283
+ * @param {Array} lines - The lines of the specified sessionDescription.
284
+ * @returns {RTCSessionDescription} A RTCSessionDescription that represents the
285
+ * result of the synthesis of IPv6 addresses.
286
+ */
287
+function _synthesizeIPv6Addresses1(sessionDescription, ips, lines) {
288
+    if (ips.size === 0) {
289
+        return sessionDescription;
290
+    }
291
+
292
+    for (let l = 0; l < lines.length; ++l) {
293
+        const candidate = lines[l];
294
+
295
+        if (typeof candidate !== 'string') {
296
+            let ip4 = candidate[4];
297
+            let ip6 = ips.get(ip4);
298
+
299
+            ip6 && (candidate[4] = ip6);
300
+
301
+            for (let i = 8; i < candidate.length; ++i) {
302
+                if (candidate[i] === 'raddr') {
303
+                    ip4 = candidate[++i];
304
+                    (ip6 = ips.get(ip4)) && (candidate[i] = ip6);
305
+                    break;
306
+                }
307
+            }
308
+
309
+            lines[l] = candidate.join(' ');
310
+        }
311
+    }
312
+
313
+    return new RTCSessionDescription({
314
+        sdp: lines.join('\r\n'),
315
+        type: sessionDescription.type
316
+    });
317
+}

+ 10
- 133
react/features/base/lib-jitsi-meet/native/polyfills-webrtc.js Ver arquivo

@@ -1,144 +1,21 @@
1
-(global => {
2
-    const {
3
-        MediaStream,
4
-        MediaStreamTrack,
5
-        RTCPeerConnection,
6
-        RTCSessionDescription,
7
-        getUserMedia
8
-    } = require('react-native-webrtc');
1
+import {
2
+    MediaStream,
3
+    MediaStreamTrack,
4
+    RTCSessionDescription,
5
+    getUserMedia
6
+} from 'react-native-webrtc';
7
+
8
+import RTCPeerConnection from './RTCPeerConnection';
9 9
 
10
+(global => {
10 11
     if (typeof global.webkitMediaStream === 'undefined') {
11 12
         global.webkitMediaStream = MediaStream;
12 13
     }
13
-
14 14
     if (typeof global.MediaStreamTrack === 'undefined') {
15 15
         global.MediaStreamTrack = MediaStreamTrack;
16 16
     }
17
-
18 17
     if (typeof global.webkitRTCPeerConnection === 'undefined') {
19
-        // XXX At the time of this writing extending RTCPeerConnection using ES6
20
-        // 'class' and 'extends' causes a runtime error related to the attempt
21
-        // to define the onaddstream property setter. The error mentions that
22
-        // babelHelpers.set is undefined which appears to be a thing inside
23
-        // React Native's packager. As a workaround, extend using the pre-ES6
24
-        // way.
25
-
26
-        /* eslint-disable no-inner-declarations */
27
-
28
-        /**
29
-         * The RTCPeerConnection provided by react-native-webrtc fires
30
-         * onaddstream before it remembers remotedescription (and thus makes it
31
-         * available to API clients). Because that appears to be a problem for
32
-         * lib-jitsi-meet which has been successfully running
33
-         * on Chrome, Firefox, Temasys, etc. for a very long time, attempt to
34
-         * meets its expectations (by extending RTCPPeerConnection).
35
-         *
36
-         * @class
37
-         */
38
-        function _RTCPeerConnection(...args) {
39
-
40
-            /* eslint-disable no-invalid-this */
41
-
42
-            RTCPeerConnection.apply(this, args);
43
-
44
-            this.onaddstream = (...args) => // eslint-disable-line no-shadow
45
-                (this._onaddstreamQueue
46
-                        ? this._queueOnaddstream
47
-                        : this._invokeOnaddstream)
48
-                    .apply(this, args);
49
-
50
-            // Shadow RTCPeerConnection's onaddstream but after
51
-            // _RTCPeerConnection has assigned to the property in question.
52
-            // Defining the property on _RTCPeerConnection's prototype may (or
53
-            // may not, I don't know) work but I don't want to try because the
54
-            // following approach appears to work and I understand it.
55
-            Object.defineProperty(this, 'onaddstream', {
56
-                configurable: true,
57
-                enumerable: true,
58
-                get() {
59
-                    return this._onaddstream;
60
-                },
61
-                set(value) {
62
-                    this._onaddstream = value;
63
-                }
64
-            });
65
-
66
-            /* eslint-enable no-invalid-this */
67
-        }
68
-
69
-        /* eslint-enable no-inner-declarations */
70
-
71
-        _RTCPeerConnection.prototype
72
-            = Object.create(RTCPeerConnection.prototype);
73
-        _RTCPeerConnection.prototype.constructor = _RTCPeerConnection;
74
-        _RTCPeerConnection.prototype._invokeOnaddstream = function(...args) {
75
-            const onaddstream = this._onaddstream;
76
-            let r;
77
-
78
-            if (onaddstream) {
79
-                r = onaddstream.apply(this, args);
80
-            }
81
-
82
-            return r;
83
-        };
84
-        _RTCPeerConnection.prototype._invokeQueuedOnaddstream = function(q) {
85
-            q && q.every(function(args) {
86
-                try {
87
-                    this._invokeOnaddstream(...args);
88
-                } catch (e) {
89
-                    // TODO Determine whether the combination of the standard
90
-                    // setRemoteDescription and onaddstream results in a similar
91
-                    // swallowing of errors.
92
-                    console && console.error && console.error(e);
93
-                }
94
-
95
-                return true;
96
-            }, this);
97
-        };
98
-        _RTCPeerConnection.prototype._queueOnaddstream = function(...args) {
99
-            this._onaddstreamQueue.push(Array.from(args));
100
-        };
101
-        _RTCPeerConnection.prototype.setRemoteDescription
102
-            = function(sessionDescription, successCallback, errorCallback) {
103
-                // Ensure I'm not remembering onaddstream invocations from
104
-                // previous setRemoteDescription calls. I shouldn't be but...
105
-                // anyway.
106
-                this._onaddstreamQueue = [];
107
-
108
-                return RTCPeerConnection.prototype.setRemoteDescription.call(
109
-                    this,
110
-                    sessionDescription,
111
-                    (...args) => {
112
-                        let r;
113
-                        let q;
114
-
115
-                        try {
116
-                            if (successCallback) {
117
-                                r = successCallback(...args);
118
-                            }
119
-                        } finally {
120
-                            q = this._onaddstreamQueue;
121
-                            this._onaddstreamQueue = undefined;
122
-                        }
123
-
124
-                        this._invokeQueuedOnaddstream(q);
125
-
126
-                        return r;
127
-                    },
128
-                    (...args) => {
129
-                        let r;
130
-
131
-                        this._onaddstreamQueue = undefined;
132
-
133
-                        if (errorCallback) {
134
-                            r = errorCallback(...args);
135
-                        }
136
-
137
-                        return r;
138
-                    });
139
-            };
140
-
141
-        global.webkitRTCPeerConnection = _RTCPeerConnection;
18
+        global.webkitRTCPeerConnection = RTCPeerConnection;
142 19
     }
143 20
     if (typeof global.RTCSessionDescription === 'undefined') {
144 21
         global.RTCSessionDescription = RTCSessionDescription;

+ 3
- 0
react/features/base/react-native/POSIX.js Ver arquivo

@@ -0,0 +1,3 @@
1
+import { NativeModules } from 'react-native';
2
+
3
+export default NativeModules.POSIX;

+ 1
- 0
react/features/base/react-native/index.js Ver arquivo

@@ -0,0 +1 @@
1
+export { default as POSIX } from './POSIX';

Carregando…
Cancelar
Salvar