Browse Source

Simplify: Remove react/features/base/react-native

master
Lyubomir Marinov 8 years ago
parent
commit
acbf3adab7

+ 4
- 5
react/features/base/lib-jitsi-meet/native/RTCPeerConnection.js View File

1
+import { NativeModules } from 'react-native';
1
 import { RTCPeerConnection, RTCSessionDescription } from 'react-native-webrtc';
2
 import { RTCPeerConnection, RTCSessionDescription } from 'react-native-webrtc';
2
 
3
 
3
-import { Platform } from '../../react';
4
-import { POSIX } from '../../react-native';
5
-
6
 // XXX At the time of this writing extending RTCPeerConnection using ES6 'class'
4
 // XXX At the time of this writing extending RTCPeerConnection using ES6 'class'
7
 // and 'extends' causes a runtime error related to the attempt to define the
5
 // and 'extends' causes a runtime error related to the attempt to define the
8
 // onaddstream property setter. The error mentions that babelHelpers.set is
6
 // onaddstream property setter. The error mentions that babelHelpers.set is
169
 function _synthesizeIPv6Addresses(sdp) {
167
 function _synthesizeIPv6Addresses(sdp) {
170
     // The synthesis of IPv6 addresses is implemented on iOS only at the time of
168
     // The synthesis of IPv6 addresses is implemented on iOS only at the time of
171
     // this writing.
169
     // this writing.
172
-    if (Platform.OS !== 'ios') {
170
+    if (!NativeModules.POSIX) {
173
         return Promise.resolve(sdp);
171
         return Promise.resolve(sdp);
174
     }
172
     }
175
 
173
 
199
     let start = 0;
197
     let start = 0;
200
     const lines = [];
198
     const lines = [];
201
     const ips = new Map();
199
     const ips = new Map();
200
+    const getaddrinfo = NativeModules.POSIX.getaddrinfo;
202
 
201
 
203
     do {
202
     do {
204
         const end = sdp.indexOf('\r\n', start);
203
         const end = sdp.indexOf('\r\n', start);
237
                                 if (v && typeof v === 'string') {
236
                                 if (v && typeof v === 'string') {
238
                                     resolve(v);
237
                                     resolve(v);
239
                                 } else {
238
                                 } else {
240
-                                    POSIX.getaddrinfo(ip).then(
239
+                                    getaddrinfo(ip).then(
241
                                         value => {
240
                                         value => {
242
                                             if (value.indexOf(':') === -1
241
                                             if (value.indexOf(':') === -1
243
                                                     || value === ips.get(ip)) {
242
                                                     || value === ips.get(ip)) {

+ 0
- 3
react/features/base/react-native/POSIX.js View File

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

+ 0
- 1
react/features/base/react-native/index.js View File

1
-export { default as POSIX } from './POSIX';

Loading…
Cancel
Save