Selaa lähdekoodia

调整AgoraView 修复安卓样式bug 添加文档

邓博 7 vuotta sitten
vanhempi
commit
d3a1108d9c

+ 1
- 1
AgoraView.js Näytä tiedosto

@@ -18,7 +18,7 @@ export default class AgoraView extends Component {
18 18
 }
19 19
 
20 20
 AgoraView.propTypes = {
21
-    localUid: PropTypes.number,
21
+    showLocalVideo: PropTypes.bool,
22 22
     remoteUid: PropTypes.number,
23 23
     ...View.propTypes
24 24
 };

+ 352
- 0
README.md Näytä tiedosto

@@ -1,2 +1,354 @@
1 1
 [![QQ Group](https://img.shields.io/badge/QQ%20Group-471757030-red.svg)]()
2
+
2 3
 # react-native-agora
4
+
5
+## Installation and linking libraries
6
+
7
+Install with npm:
8
+
9
+ `npm install --save react-native-agora`
10
+
11
+Or, install with yarn:
12
+
13
+ `yarn add react-native-agora`
14
+
15
+Either way, then link with:
16
+
17
+ `react-native link react-native-agora`
18
+
19
+#### iOS
20
+
21
+TARGETS->Build Phases-> Link Binary With Libaries中点击“+”按钮,选择
22
+
23
+    libresolv.tbd
24
+    libc++.tbd
25
+    AVFoundation.framework
26
+    AudioToolbox.framework
27
+    VideoToolbox.framework
28
+    CoreMotion.framework
29
+    CoreMedia.framework
30
+    CoreTelephony.framework
31
+TARGETS->Build Phases-> Link Binary With Libaries中点击“+”按钮,在弹出的窗口中点击“Add Other”按钮,选择
32
+    node_modules/react-native-agora/ios/RCTAgora/libs/libcrypto.a
33
+    node_modules/react-native-agora/ios/RCTAgora/libs/AgoraRtcCryptoLoader.framework
34
+    node_modules/react-native-agora/ios/RCTAgora/libs/AgoraRtcEngineKit.framework
35
+TARGETS->Build Settings->Search Paths->Framework Search Paths添加
36
+    "$(SRCROOT)/../node_modules/react-native-agora/ios/RCTAgora/libs"
37
+TARGETS->Build Settings->Search Paths->Library Search Paths添加
38
+    "$(SRCROOT)/../node_modules/react-native-agora/ios/RCTAgora/libs"
39
+TARGETS->Build Settings->Enable Bitcode设置为No
40
+
41
+TARGETS->Capabilities->Background Modes->Modes勾选Audio,AirPlay,and Picture In Picture
42
+
43
+项目目录->Info.plist->增加2项
44
+
45
+    "Privacy - Camera Usage Description":"use camera to start video call"
46
+    "Privacy - Microphone Usage Description":"use microphone to start video call"
47
+
48
+
49
+#### Android
50
+
51
+Add following to `AndroidManifest.xml`
52
+
53
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
54
+    <uses-permission android:name="android.permission.CAMERA" />
55
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
56
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
57
+
58
+当您在写混淆代码时,请添加以下代码:
59
+
60
+    -keep class io.agora.**{*;}
61
+
62
+
63
+## Documentation
64
+
65
+[声网API文档](https://docs.agora.io/cn/1.11.1/user_guide/API/ios_api_live_cn.html)
66
+
67
+##### RtcEngine方法
68
+
69
+| Property                         | Type                                     | Description                           |
70
+| -------------------------------- | ---------------------------------------- | ------------------------------------- |
71
+| init                             | object {appid: 'agora注册的应用id', channelProfile: '频道模式', videoProfile: '视频模式', clientRole: '角色'} | 初始化Agora引擎                            |
72
+| joinChannel                      | string channelName (房间名称)   number uid (用户设置的uid 传0系统会自动分配) | 加入房间                                  |
73
+| leaveChannel                     |                                          | 离开频道                                  |
74
+| destroy                          |                                          | 销毁引擎实例                                |
75
+| startPreview                     |                                          | 开启视频预览                                |
76
+| stopPreview                      |                                          | 关闭视频预览                                |
77
+| switchCamera                     |                                          | 切换前置/后置摄像头                            |
78
+| enableVideo                      |                                          | 开启视频模式                                |
79
+| disableVideo                     |                                          | 关闭视频                                  |
80
+| setEnableSpeakerphone            | bool                                     | 开启扬声器  trun: 音频输出至扬声器  false: 音频输出至听筒 |
81
+| muteLocalAudioStream             | bool (default false)                     | 将自己静音                                 |
82
+| muteAllRemoteAudioStreams        | bool (default false)                     | 静音所有远端 音频                             |
83
+| muteRemoteAudioStream            | number uid(用户uid) bool  mute(是否静音)       | 静音指定用户 音频                             |
84
+| muteLocalVideoStream             | bool (default false)                     | 暂停发送本地 视频流                            |
85
+| enableLocalVideo                 | bool (default false)                     | 禁用本地视频功能                              |
86
+| muteAllRemoteVideoStreams        | bool (default false)                     | 暂停所有远端视频流                             |
87
+| muteRemoteVideoStream            | number uid(用户uid) bool  mute(是否暂停)       | 暂停指定远端视频流                             |
88
+| startRecordingService (ios only) | string  recordingKey                     | 启动服务端录制服务                             |
89
+| stopRecordingService (ios only)  | string  recordingKey                     | 停止服务端录制服务                             |
90
+| getSdkVersion                    | callback                                 | 获取版本号                                 |
91
+
92
+##### 原生通知事件
93
+
94
+```
95
+RtcEngine.eventEmitter({
96
+  onFirstRemoteVideoDecoded: data => {},
97
+  onJoinChannelSuccess: data => {},
98
+  onUserOffline: data => {},
99
+  onUserJoined: data => {},
100
+  onError: data => {},
101
+  onWarning: data => {},
102
+  onLeaveChannel: data => {}
103
+})
104
+```
105
+
106
+| Name                      | Description  |
107
+| ------------------------- | ------------ |
108
+| onFirstRemoteVideoDecoded | 远端首帧视频接收解码回调 |
109
+| onJoinChannelSuccess      | 加入频道成功的回调    |
110
+| onUserOffline             | 其他用户离开当前频道   |
111
+| onUserJoined              | 其他用户加入当前频道   |
112
+| onError                   | 错误信息         |
113
+| onWarning                 | 警告           |
114
+| onLeaveChannel            | 退出频道         |
115
+
116
+##### AgoraView 组件
117
+
118
+| Name           | Description          |
119
+| -------------- | -------------------- |
120
+| showLocalVideo | 是否显示本地视频(bool)       |
121
+| remoteUid      | 显示远程视频(number 传入uid) |
122
+
123
+## Usage
124
+
125
+```
126
+import React, {Component} from 'react';
127
+import {
128
+    StyleSheet,
129
+    View,
130
+    Text,
131
+    TouchableOpacity,
132
+    Image,
133
+    Dimensions
134
+} from 'react-native';
135
+
136
+const {width, height} = Dimensions.get('window');
137
+
138
+import {RtcEngine, AgoraView} from 'react-native-agora'
139
+
140
+export default class Meeting extends Component {
141
+
142
+    constructor(props) {
143
+        super(props);
144
+        this.state = {
145
+            remotes: [],
146
+            isJoinSuccess: false,
147
+            isSpeaker: false,
148
+            isMute: false
149
+        };
150
+    }
151
+
152
+    componentWillMount() {
153
+
154
+        //初始化Agora
155
+        const options = {
156
+            appid: '',
157
+            channelProfile: 1,
158
+            videoProfile: 40,
159
+            clientRole: 1,
160
+        };
161
+        RtcEngine.init(options);
162
+    }
163
+
164
+    componentDidMount() {
165
+
166
+        //加入房间
167
+        RtcEngine.joinChannel();
168
+
169
+        //所以的原生通知统一管理
170
+        RtcEngine.eventEmitter({
171
+            onFirstRemoteVideoDecoded: (data) => {
172
+                console.log(data);
173
+                //有远程视频加入 返回重要的  uid  AgoraView 根据uid 来设置remoteUid值
174
+                const {remotes} = this.state;
175
+
176
+                let arr = [...remotes];
177
+                let sign = false;
178
+                arr.forEach(v => {
179
+                    sign = v === data.uid
180
+                });
181
+
182
+                if (!sign) {
183
+                    arr.push(data.uid)
184
+                }
185
+
186
+                this.setState({
187
+                    remotes: arr
188
+                })
189
+            },
190
+            onUserOffline: (data) => {
191
+             	console.log(data);
192
+              	//有人离开了!
193
+                const {remotes} = this.state;
194
+
195
+                let arr = [...remotes];
196
+
197
+                let newArr = [];
198
+                newArr = arr.filter(v => {
199
+                    return v !== data.uid
200
+                });
201
+
202
+                this.setState({
203
+                    remotes: newArr
204
+                });
205
+            },
206
+            onJoinChannelSuccess: (data) => {
207
+                console.log(data);
208
+ 			   //加入房间成功!
209
+                this.setState({
210
+                    isJoinSuccess: true
211
+                });
212
+            },
213
+            onUserJoined: (data) => {
214
+                console.log(data);
215
+                //有人来了!
216
+            },
217
+            onError: (data) => {
218
+                console.log(data);
219
+                //错误!
220
+                RtcEngine.leaveChannel();
221
+            }
222
+        })
223
+    }
224
+
225
+    componentWillUnmount() {
226
+        RtcEngine.removeEmitter()
227
+    }
228
+
229
+    handlerCancel = () => {
230
+
231
+        RtcEngine.leaveChannel();
232
+
233
+        const {navigator} = this.props;
234
+        navigator.pop()
235
+    };
236
+
237
+    handlerSwitchCamera = () => {
238
+        RtcEngine.switchCamera();
239
+    };
240
+
241
+    handlerMuteAllRemoteAudioStreams = () => {
242
+        this.setState({
243
+            isMute: !this.state.isMute
244
+        }, () => {
245
+            RtcEngine.muteAllRemoteAudioStreams(this.state.isMute)
246
+        })
247
+    };
248
+
249
+    handlerSetEnableSpeakerphone = () => {
250
+
251
+        this.setState({
252
+            isSpeaker: !this.state.isSpeaker
253
+        }, () => {
254
+            RtcEngine.setEnableSpeakerphone(this.state.isSpeaker)
255
+        });
256
+
257
+    };
258
+
259
+    render() {
260
+
261
+        const {isMute, isSpeaker, remotes, isJoinSuccess} = this.state;
262
+
263
+        if (!isJoinSuccess) {
264
+            return(
265
+                <View style={{flex:1, backgroundColor:'#fff', justifyContent:'center', alignItems:'center'}}>
266
+                    <Text>正在创建视频会议...</Text>
267
+                </View>
268
+            )
269
+        }
270
+
271
+        return (
272
+            <View style={styles.container}>
273
+                <AgoraView style={styles.localView} showLocalVideo={true} />
274
+                <View style={styles.absView}>
275
+                    <View style={styles.videoView}>
276
+                        {remotes.map((v, k) => {
277
+                            return (
278
+                                <AgoraView
279
+                                    style={styles.remoteView}
280
+                                    key={k}
281
+                                    remoteUid={v}
282
+                                />
283
+                            )
284
+                        })}
285
+                    </View>
286
+                    <View>
287
+                        <TouchableOpacity
288
+                            style={{alignSelf: 'center'}}
289
+                            onPress={this.handlerCancel}>
290
+                            <Image
291
+                                style={{width: 60, height: 60}}
292
+                                source={require('../images/btn_endcall.png')}/>
293
+                        </TouchableOpacity>
294
+                        <View style={styles.bottomView}>
295
+                            <TouchableOpacity onPress={this.handlerMuteAllRemoteAudioStreams} activeOpacity={.7}>
296
+                                <Image
297
+                                    style={{width: 50, height: 50}}
298
+                                    source={ isMute ? require('../images/icon_muted.png') : require('../images/btn_mute.png')}/>
299
+                            </TouchableOpacity>
300
+
301
+                            <TouchableOpacity onPress={this.handlerSwitchCamera} activeOpacity={.7}>
302
+                                <Image
303
+                                    style={{width: 50, height: 50}}
304
+                                    source={ require('../images/btn_switch_camera.png')}/>
305
+                            </TouchableOpacity>
306
+
307
+                            <TouchableOpacity onPress={this.handlerSetEnableSpeakerphone} activeOpacity={.7}>
308
+                                <Image
309
+                                    style={{width: 50, height: 50}}
310
+                                    source={isSpeaker ? require('../images/icon_speaker.png') : require('../images/btn_speaker.png')}/>
311
+                            </TouchableOpacity>
312
+                        </View>
313
+                    </View>
314
+
315
+                </View>
316
+            </View>
317
+        );
318
+    }
319
+}
320
+
321
+const styles = StyleSheet.create({
322
+    container: {
323
+        flex: 1,
324
+        backgroundColor: '#F4F4F4'
325
+    },
326
+    absView: {
327
+        position: 'absolute',
328
+        top: 20,
329
+        left: 0,
330
+        right: 0,
331
+        bottom: 0,
332
+        justifyContent: 'space-between'
333
+    },
334
+    videoView: {
335
+        padding: 5,
336
+        flexWrap: 'wrap',
337
+        flexDirection: 'row',
338
+        zIndex: 100
339
+    },
340
+    localView: {
341
+        flex: 1
342
+    },
343
+    remoteView: {
344
+        width: (width - 40) / 3,
345
+        height: (width - 40) / 3,
346
+        margin: 5
347
+    },
348
+    bottomView: {
349
+        padding: 20,
350
+        flexDirection: 'row',
351
+        justifyContent: 'space-around'
352
+    }
353
+});
354
+```

+ 2
- 2
RtcEngine.js Näytä tiedosto

@@ -12,8 +12,8 @@ export default {
12 12
         this.listener && this.listener.remove();
13 13
         Agora.init(options);
14 14
     },
15
-    joinChannel(channelName = '001'){
16
-        Agora.joinChannel(channelName)
15
+    joinChannel(channelName = '00001', uid = 0){
16
+        Agora.joinChannel(channelName, uid)
17 17
     },
18 18
     eventEmitter(fnConf) {
19 19
         //there are no `removeListener` for NativeAppEventEmitter & DeviceEventEmitter

+ 5
- 12
android/src/main/java/com/syan/agora/AgoraManager.java Näytä tiedosto

@@ -1,7 +1,6 @@
1 1
 package com.syan.agora;
2 2
 
3 3
 import android.content.Context;
4
-import android.util.Log;
5 4
 import android.util.SparseArray;
6 5
 import android.view.SurfaceView;
7 6
 
@@ -58,10 +57,8 @@ public class AgoraManager {
58 57
         //视频配置,设置为360P
59 58
         mRtcEngine.setVideoProfile(options.getInt("videoProfile"), true);
60 59
         mRtcEngine.enableWebSdkInteroperability(true);  //设置和web通信
61
-//        mRtcEngine.setChannelProfile(Constants.CHANNEL_PROFILE_COMMUNICATION);//设置为通信模式(默认)
62
-        mRtcEngine.setChannelProfile(options.getInt("channelProfile")); //设置为直播模式
63
-//        mRtcEngine.setChannelProfile(Constants.CHANNEL_PROFILE_GAME); //设置为游戏模式
64
-        mRtcEngine.setClientRole(options.getInt("clientRole"), null); //设置为主播
60
+        mRtcEngine.setChannelProfile(options.getInt("channelProfile")); //设置模式
61
+        mRtcEngine.setClientRole(options.getInt("clientRole"), null); //设置角色
65 62
     }
66 63
 
67 64
     /**
@@ -82,23 +79,19 @@ public class AgoraManager {
82 79
 
83 80
     public AgoraManager setupRemoteVideo(int uid) {
84 81
 
85
-        Log.i("Agora", "mSurfaceViews1---" + mSurfaceViews.toString());
86
-
87 82
         SurfaceView surfaceView = RtcEngine.CreateRendererView(context);
88 83
         mSurfaceViews.put(uid, surfaceView);
89 84
         mRtcEngine.setupRemoteVideo(new VideoCanvas(surfaceView, VideoCanvas.RENDER_MODE_HIDDEN, uid));
90
-        Log.i("Agora", "mSurfaceViews2---" + mSurfaceViews.toString());
91 85
         return this;
92 86
     }
93 87
 
94
-    public AgoraManager joinChannel(String channel) {
95
-        mRtcEngine.joinChannel(null, channel, null, 0);
88
+    public AgoraManager joinChannel(String channel, int uid) {
89
+        mRtcEngine.joinChannel(null, channel, null, uid);
96 90
         return this;
97 91
     }
98 92
 
99 93
     public void startPreview() {
100
-        int a = mRtcEngine.startPreview();
101
-        Log.i("Agora", "开启预览---" + a);
94
+        mRtcEngine.startPreview();
102 95
     }
103 96
 
104 97
     public void stopPreview() {

+ 15
- 2
android/src/main/java/com/syan/agora/AgoraModule.java Näytä tiedosto

@@ -163,16 +163,29 @@ public class AgoraModule extends ReactContextBaseJavaModule {
163 163
 
164 164
     //进入房间
165 165
     @ReactMethod
166
-    public void joinChannel(String channelName) {
167
-        AgoraManager.getInstance().joinChannel(channelName);
166
+    public void joinChannel(String channelName, int uid) {
167
+        AgoraManager.getInstance().joinChannel(channelName, uid);
168 168
     }
169 169
 
170 170
     //退出
171 171
     @ReactMethod
172 172
     public void leaveChannel() {
173
+        AgoraManager.getInstance().stopPreview();
173 174
         AgoraManager.getInstance().leaveChannel();
174 175
     }
175 176
 
177
+    //开启预览
178
+    @ReactMethod
179
+    public void startPreview() {
180
+        AgoraManager.getInstance().startPreview();
181
+    }
182
+
183
+    //闭关预览
184
+    @ReactMethod
185
+    public void stopPreview() {
186
+        AgoraManager.getInstance().stopPreview();
187
+    }
188
+
176 189
     //打开音频
177 190
     @ReactMethod
178 191
     public void enableAudio() {

+ 8
- 15
android/src/main/java/com/syan/agora/AgoraViewManage.java Näytä tiedosto

@@ -22,32 +22,25 @@ public class AgoraViewManage extends SimpleViewManager<AgoraVideoView> {
22 22
 
23 23
     @Override
24 24
     protected AgoraVideoView createViewInstance(ThemedReactContext reactContext) {
25
-
26 25
         return new AgoraVideoView(reactContext);
27
-
28 26
     }
29 27
 
30
-    @ReactProp(name = "localUid")
31
-    public void setLocalUid(final AgoraVideoView agoraVideoView, int localUid) {
28
+    @ReactProp(name = "showLocalVideo")
29
+    public void setShowLocalVideo(final AgoraVideoView agoraVideoView, boolean showLocalVideo) {
32 30
 
33
-        if (localUid == 0) {
31
+        if (showLocalVideo) {
34 32
             SurfaceView surfaceView = AgoraManager.getInstance().getLocalSurfaceView();
35
-            surfaceView.setZOrderMediaOverlay(true);
36 33
             surfaceView.setVisibility(View.VISIBLE);
37 34
             agoraVideoView.addView(surfaceView);
38 35
         }
39
-
40 36
     }
41 37
 
42 38
     @ReactProp(name = "remoteUid")
43 39
     public void setRemoteUid(final AgoraVideoView agoraVideoView, int remoteUid) {
44
-
45
-        if (remoteUid != 0) {
46
-            AgoraManager.getInstance().setupRemoteVideo(remoteUid);
47
-            SurfaceView surfaceView = AgoraManager.getInstance().getSurfaceView(remoteUid);
48
-            surfaceView.setZOrderMediaOverlay(true);
49
-            surfaceView.setVisibility(View.VISIBLE);
50
-            agoraVideoView.addView(surfaceView);
51
-        }
40
+        AgoraManager.getInstance().setupRemoteVideo(remoteUid);
41
+        SurfaceView surfaceView = AgoraManager.getInstance().getSurfaceView(remoteUid);
42
+        surfaceView.setVisibility(View.VISIBLE);
43
+        agoraVideoView.addView(surfaceView);
44
+        surfaceView.setZOrderMediaOverlay(true);
52 45
     }
53 46
 }

+ 2
- 0
ios/RCTAgora/AgoraConst.h Näytä tiedosto

@@ -12,6 +12,8 @@
12 12
 
13 13
 @property (nonatomic, copy) NSString *appid;
14 14
 
15
+@property (nonatomic, assign) NSInteger localUid;
16
+
15 17
 @property (strong, nonatomic) AgoraRtcEngineKit *rtcEngine;
16 18
 
17 19
 + (instancetype)share;

+ 20
- 2
ios/RCTAgora/RCTAgora.m Näytä tiedosto

@@ -71,8 +71,10 @@ RCT_EXPORT_METHOD(init:(NSDictionary *)options) {
71 71
 }
72 72
 
73 73
 //加入房间
74
-RCT_EXPORT_METHOD(joinChannel:(NSString *)channelName) {
75
-    [self.rtcEngine joinChannelByKey:nil channelName:channelName info:nil uid:0 joinSuccess:NULL];
74
+RCT_EXPORT_METHOD(joinChannel:(NSString *)channelName uid:(NSInteger)uid) {
75
+    //保存一下uid 在自定义视图使用
76
+    [AgoraConst share].localUid = uid;
77
+    [self.rtcEngine joinChannelByKey:nil channelName:channelName info:nil uid:uid joinSuccess:NULL];
76 78
 }
77 79
 
78 80
 //离开频道
@@ -85,6 +87,11 @@ RCT_EXPORT_METHOD(leaveChannel){
85 87
     }];
86 88
 }
87 89
 
90
+//销毁引擎实例
91
+RCT_EXPORT_METHOD(destroy){
92
+    [AgoraRtcEngineKit destroy];
93
+}
94
+
88 95
 //设置 本地 视频显示属性
89 96
 RCT_EXPORT_METHOD(setupLocalVideo:(NSDictionary *)options){
90 97
     AgoraRtcVideoCanvas *canvas = [[AgoraRtcVideoCanvas alloc] init];
@@ -103,6 +110,17 @@ RCT_EXPORT_METHOD(setupRemoteVideo:(NSDictionary *)options){
103 110
     [self.rtcEngine setupRemoteVideo:canvas];
104 111
 }
105 112
 
113
+//开启视频预览
114
+RCT_EXPORT_METHOD(startPreview){
115
+    [self.rtcEngine startPreview];
116
+    
117
+}
118
+
119
+//关闭视频预览
120
+RCT_EXPORT_METHOD(stopPreview){
121
+    [self.rtcEngine stopPreview];
122
+}
123
+
106 124
 //切换前置/后置摄像头
107 125
 RCT_EXPORT_METHOD(switchCamera){
108 126
     [self.rtcEngine switchCamera];

+ 1
- 1
ios/RCTAgora/RCTAgoraVideoView.h Näytä tiedosto

@@ -13,7 +13,7 @@
13 13
 
14 14
 @property (strong, nonatomic) AgoraRtcEngineKit *rtcEngine;
15 15
 
16
-@property (nonatomic) NSInteger localUid;
16
+@property (nonatomic) BOOL showLocalVideo;
17 17
 @property (nonatomic) NSInteger remoteUid;
18 18
 
19 19
 @end

+ 13
- 3
ios/RCTAgora/RCTAgoraVideoView.m Näytä tiedosto

@@ -19,10 +19,20 @@
19 19
     return self;
20 20
 }
21 21
 
22
-- (void)setLocalUid:(NSInteger)localUid {
23
-    if (localUid == 0) {
22
+//- (void)setLocalUid:(NSInteger)localUid {
23
+//    if (localUid == 0) {
24
+//        AgoraRtcVideoCanvas *canvas = [[AgoraRtcVideoCanvas alloc] init];
25
+//        canvas.uid = localUid;
26
+//        canvas.view = self;
27
+//        canvas.renderMode = AgoraRtc_Render_Hidden;
28
+//        [_rtcEngine setupLocalVideo:canvas];
29
+//    }
30
+//}
31
+
32
+- (void)setShowLocalVideo:(Boolean)showLocalVideo {
33
+    if (showLocalVideo) {
24 34
         AgoraRtcVideoCanvas *canvas = [[AgoraRtcVideoCanvas alloc] init];
25
-        canvas.uid = localUid;
35
+        canvas.uid = [AgoraConst share].localUid;
26 36
         canvas.view = self;
27 37
         canvas.renderMode = AgoraRtc_Render_Hidden;
28 38
         [_rtcEngine setupLocalVideo:canvas];

+ 1
- 1
ios/RCTAgora/RCTAgoraViewManager.m Näytä tiedosto

@@ -13,7 +13,7 @@
13 13
 
14 14
 RCT_EXPORT_MODULE()
15 15
 
16
-RCT_EXPORT_VIEW_PROPERTY(localUid, NSInteger)
16
+RCT_EXPORT_VIEW_PROPERTY(showLocalVideo, BOOL)
17 17
 RCT_EXPORT_VIEW_PROPERTY(remoteUid, NSInteger)
18 18
 
19 19
 - (UIView *)view {

+ 1
- 1
package.json Näytä tiedosto

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "react-native-agora",
3
-  "version": "1.0.6",
3
+  "version": "1.0.7",
4 4
   "description": "声网Agora",
5 5
   "main": "index.js",
6 6
   "scripts": {