瀏覽代碼

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

master
Lyubomir Marinov 8 年之前
父節點
當前提交
acbf3adab7

+ 4
- 5
react/features/base/lib-jitsi-meet/native/RTCPeerConnection.js 查看文件

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

+ 0
- 3
react/features/base/react-native/POSIX.js 查看文件

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

+ 0
- 1
react/features/base/react-native/index.js 查看文件

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

Loading…
取消
儲存