Browse Source

chore. update changelog

matrixbirds 5 years ago
parent
commit
ab98a5e2fe

+ 14
- 0
CHANGELOG View File

1
 ## THE CHANGELOG
1
 ## THE CHANGELOG
2
 
2
 
3
+#### 2.4.1-alpha
4
+- support 2.4.1-alpha.1 agora video sdk android-2.4.1 / iOS-2.4.1
5
+  1. Deprecate iOS
6
+  2. Add methods getAudioMixingPlayoutVolume, getAudioMixingPublishVolume for audio mixing troubleshooting.
7
+  3. Add `txPacketLossRate`, `rxPacketLossRate` on `rtcStats` interface. usage: `RtcEngine.on('rtcStats', (data) => console.log(data))`.
8
+  4. Rename `receivedFrameRate` to `rendererOutputFrameRate` this property related on `localVideoStats` and `remoteVideoStats`.
9
+  5. Add event 'localVideoChanged' and Deprecate events `cameraReady` and `videoStopped`. You can listen `localVideoChanged` event instead  `cameraReady` & `videoStopped`.
10
+  6. Add event `rtmpStreamingStateChanged` for rtmp streaming troubleshooting
11
+  7. Add event `audioCodecProfile` on `liveTranscoding` interface.
12
+  8. Add event `networkTypeChanged` for network troubleshooting.
13
+  9. Add method `registerMediaMetadataObserver` method, this method enables you to add synchronized metadata in the video stream for more diversified live broadcast interactions, such as sending shopping links, digital coupons, and online quizzes. note: Call this method before the joinChannel method. and applies to `channelProfile` with 1. 
14
+  10. Add method `sendMediaData`, this method enables you send media data under the live broadcast mode (`channelProfile` = 1) note: call this method after the `registerMediaMetadataObserver` method.
15
+  11. Add event `audioMixingStateChanged` and Deprecate event 'localAudioMixingFinish`.
16
+  11. Add `firstRemoteAudioDecoded` event you can get more detail [here](https://docs.agora.io/en/Interactive%20Broadcast/release_android_video?platform=Android#v241)
3
 
17
 
4
 #### 2.4.0-alpha
18
 #### 2.4.0-alpha
5
 - support 2.4.0-alpha.1 agora video sdk android-2.4.0 / iOS-2.4.0.1 and add sendMessage support in the same channel. Deprecate: startEchoTest and setVideoQualityParameters
19
 - support 2.4.0-alpha.1 agora video sdk android-2.4.0 / iOS-2.4.0.1 and add sendMessage support in the same channel. Deprecate: startEchoTest and setVideoQualityParameters

+ 24
- 29
android/src/main/java/com/syan/agora/AgoraModule.java View File

291
     private final static String AGNetworkTypeChanged = "networkTypeChanged";
291
     private final static String AGNetworkTypeChanged = "networkTypeChanged";
292
     private final static String AGFirstRemoteAudioDecoded = "firstRemoteAudioDecoded";
292
     private final static String AGFirstRemoteAudioDecoded = "firstRemoteAudioDecoded";
293
     private final static String AGMediaMetaDataReceived = "mediaMetaDataReceived";
293
     private final static String AGMediaMetaDataReceived = "mediaMetaDataReceived";
294
+    private final static String AGLocalVideoChanged = "localVideoChanged";
294
     private final static String AGRemoteVideoStateChanged = "remoteVideoStateChanged";
295
     private final static String AGRemoteVideoStateChanged = "remoteVideoStateChanged";
295
     private final static String AGLocalPublishFallbackToAudioOnly = "localPublishFallbackToAudioOnly";
296
     private final static String AGLocalPublishFallbackToAudioOnly = "localPublishFallbackToAudioOnly";
296
     private final static String AGRemoteSubscribeFallbackToAudioOnly = "remoteSubscribeFallbackToAudioOnly";
297
     private final static String AGRemoteSubscribeFallbackToAudioOnly = "remoteSubscribeFallbackToAudioOnly";
309
     private final static String AGAudioTransportStatsOfUid = "audioTransportStatsOfUid";
310
     private final static String AGAudioTransportStatsOfUid = "audioTransportStatsOfUid";
310
     private final static String AGVideoTransportStatsOfUid = "videoTransportStatsOfUid";
311
     private final static String AGVideoTransportStatsOfUid = "videoTransportStatsOfUid";
311
 
312
 
312
-    private final static String AGLocalAudioMixingFinish = "localAudioMixingFinish";
313
     private final static String AGRemoteAudioMixingStart = "remoteAudioMixingStart";
313
     private final static String AGRemoteAudioMixingStart = "remoteAudioMixingStart";
314
     private final static String AGRemoteAudioMixingFinish = "remoteAudioMixingFinish";
314
     private final static String AGRemoteAudioMixingFinish = "remoteAudioMixingFinish";
315
     private final static String AGAudioEffectFinish = "audioEffectFinish";
315
     private final static String AGAudioEffectFinish = "audioEffectFinish";
316
+    private final static String AGAudioMixingStateChanged = "audioMixingStateChanged";
316
 
317
 
317
     private final static String AGStreamPublished = "streamPublished";
318
     private final static String AGStreamPublished = "streamPublished";
318
     private final static String AGStreamUnpublish = "streamUnpublish";
319
     private final static String AGStreamUnpublish = "streamUnpublish";
594
             });
595
             });
595
         }
596
         }
596
 
597
 
597
-//        @Override
598
-//        public void onVideoStopped() {
599
-//            runOnUiThread(new Runnable() {
600
-//                @Override
601
-//                public void run() {
602
-//                    WritableMap map = Arguments.createMap();
603
-//                    map.putString("message", "VideoStopped");
604
-//                    sendEvent(getReactApplicationContext(), AGVideoStopped, map);
605
-//                }
606
-//            });
607
-//        }
608
-
609
         @Override
598
         @Override
610
         public void onFirstLocalVideoFrame(final int width, final int height, final int elapsed) {
599
         public void onFirstLocalVideoFrame(final int width, final int height, final int elapsed) {
611
             runOnUiThread(new Runnable() {
600
             runOnUiThread(new Runnable() {
809
             });
798
             });
810
         }
799
         }
811
 
800
 
812
-        @Override
813
-        public void onCameraReady() {
814
-            runOnUiThread(new Runnable() {
815
-                @Override
816
-                public void run() {
817
-                    WritableMap map = Arguments.createMap();
818
-                    map.putString("message", "CameraDidReady");
819
-                    sendEvent(getReactApplicationContext(), AGCameraReady, map);
820
-                }
821
-            });
822
-        }
823
-
824
         @Override
801
         @Override
825
         public void onCameraFocusAreaChanged(final Rect rect) {
802
         public void onCameraFocusAreaChanged(final Rect rect) {
826
             runOnUiThread(new Runnable() {
803
             runOnUiThread(new Runnable() {
890
                     statsMap.putInt("userCount", stats.users);
867
                     statsMap.putInt("userCount", stats.users);
891
                     statsMap.putDouble("cpuAppUsage", stats.cpuAppUsage);
868
                     statsMap.putDouble("cpuAppUsage", stats.cpuAppUsage);
892
                     statsMap.putDouble("cpuTotalUsage", stats.cpuTotalUsage);
869
                     statsMap.putDouble("cpuTotalUsage", stats.cpuTotalUsage);
870
+                    statsMap.putInt("txPacketLossRate", stats.txPacketLossRate);
871
+                    statsMap.putInt("rxPacketLossRate", stats.rxPacketLossRate);
893
 
872
 
894
                     WritableMap map = Arguments.createMap();
873
                     WritableMap map = Arguments.createMap();
895
                     map.putMap("stats", statsMap);
874
                     map.putMap("stats", statsMap);
1002
         }
981
         }
1003
 
982
 
1004
         @Override
983
         @Override
1005
-        public void onAudioMixingFinished() {
984
+        public void onAudioMixingStateChanged(final int state, final int errorCode) {
1006
             runOnUiThread(new Runnable() {
985
             runOnUiThread(new Runnable() {
1007
                 @Override
986
                 @Override
1008
                 public void run() {
987
                 public void run() {
1009
                     WritableMap map = Arguments.createMap();
988
                     WritableMap map = Arguments.createMap();
1010
-                    map.putString("message", "LocalAudioMixingSucceedFinish");
1011
-                    sendEvent(getReactApplicationContext(), AGLocalAudioMixingFinish, map);
989
+                    map.putInt("state", state);
990
+                    map.putInt("errorCode", errorCode);
991
+                    sendEvent(getReactApplicationContext(), AGAudioMixingStateChanged, map);
1012
                 }
992
                 }
1013
             });
993
             });
1014
         }
994
         }
1146
                 }
1126
                 }
1147
             });
1127
             });
1148
         }
1128
         }
1129
+
1130
+        @Override
1131
+        public void onLocalVideoStateChanged(final int localVideoState, final int error) {
1132
+            super.onLocalVideoStateChanged(localVideoState, error);
1133
+            runOnUiThread(new Runnable() {
1134
+                @Override
1135
+                public void run() {
1136
+                    WritableMap map = Arguments.createMap();
1137
+                    map.putString("message", "LocalVideoChanged");
1138
+                    map.putInt("state", localVideoState);
1139
+                    sendEvent(getReactApplicationContext(), AGLocalVideoChanged, map);
1140
+                }
1141
+            });
1142
+        }
1149
     };
1143
     };
1150
 
1144
 
1151
     @ReactMethod
1145
     @ReactMethod
1769
             int res = AgoraManager.getInstance().mRtcEngine.getAudioMixingPlayoutVolume();
1763
             int res = AgoraManager.getInstance().mRtcEngine.getAudioMixingPlayoutVolume();
1770
             if (res < 0) throw new ReactNativeAgoraException("getAudioMixingPlayoutVolume Failed", res);
1764
             if (res < 0) throw new ReactNativeAgoraException("getAudioMixingPlayoutVolume Failed", res);
1771
             WritableMap map = Arguments.createMap();
1765
             WritableMap map = Arguments.createMap();
1772
-            map.putString("volume", Integer.toString(res));
1766
+            map.putBoolean("success", true);
1767
+            map.putInt("value", res);
1773
             promise.resolve(map);
1768
             promise.resolve(map);
1774
         } catch (Exception e) {
1769
         } catch (Exception e) {
1775
             promise.reject("-1", e);
1770
             promise.reject("-1", e);

+ 0
- 1
ios/RCTAgora/AgoraConst.h View File

57
 static NSString *AGAudioTransportStatsOfUid = @"audioTransportStatsOfUid";
57
 static NSString *AGAudioTransportStatsOfUid = @"audioTransportStatsOfUid";
58
 static NSString *AGVideoTransportStatsOfUid = @"videoTransportStatsOfUid";
58
 static NSString *AGVideoTransportStatsOfUid = @"videoTransportStatsOfUid";
59
 
59
 
60
-static NSString *AGLocalAudioMixingFinish = @"localAudioMixingFinish";
61
 static NSString *AGRemoteAudioMixingStart = @"remoteAudioMixingStart";
60
 static NSString *AGRemoteAudioMixingStart = @"remoteAudioMixingStart";
62
 static NSString *AGRemoteAudioMixingFinish = @"remoteAudioMixingFinish";
61
 static NSString *AGRemoteAudioMixingFinish = @"remoteAudioMixingFinish";
63
 static NSString *AGAudioEffectFinish = @"audioEffectFinish";
62
 static NSString *AGAudioEffectFinish = @"audioEffectFinish";

+ 5
- 11
ios/RCTAgora/RCTAgora.m View File

1981
 RCT_EXPORT_METHOD(registerMediaMetadataObserver
1981
 RCT_EXPORT_METHOD(registerMediaMetadataObserver
1982
                   :(RCTPromiseResolveBlock)resolve
1982
                   :(RCTPromiseResolveBlock)resolve
1983
                   reject:(RCTPromiseRejectBlock)reject) {
1983
                   reject:(RCTPromiseRejectBlock)reject) {
1984
-  BOOL res = [_rtcEngine setMediaMetadataDataSource:self withType:AgoraMetadataTypeVideo];
1985
-  if (res == YES) {
1984
+  if (YES == [_rtcEngine setMediaMetadataDataSource:self withType:AgoraMetadataTypeVideo] &&
1985
+    YES == [_rtcEngine setMediaMetadataDelegate:self withType:AgoraMetadataTypeVideo]
1986
+    ) {
1986
     resolve(@{
1987
     resolve(@{
1987
               @"success": @(YES)
1988
               @"success": @(YES)
1988
               });
1989
               });
1991
                                                                              @"code": @(-1),
1992
                                                                              @"code": @(-1),
1992
                                                                              @"message":@{
1993
                                                                              @"message":@{
1993
                                                                                  @"success": @(NO),
1994
                                                                                  @"success": @(NO),
1994
-                                                                                 @"value":[NSNumber numberWithInteger:res]
1995
+                                                                                 @"value":@(0)
1995
                                                                                  }
1996
                                                                                  }
1996
                                                                              }]);
1997
                                                                              }]);
1997
   }
1998
   }
2046
            AGAudioTransportStatsOfUid,
2047
            AGAudioTransportStatsOfUid,
2047
            AGVideoTransportStatsOfUid,
2048
            AGVideoTransportStatsOfUid,
2048
            
2049
            
2049
-           AGLocalAudioMixingFinish,
2050
+           AGAudioMixingStateChanged,
2050
            AGRemoteAudioMixingStart,
2051
            AGRemoteAudioMixingStart,
2051
            AGRemoteAudioMixingFinish,
2052
            AGRemoteAudioMixingFinish,
2052
            AGAudioEffectFinish,
2053
            AGAudioEffectFinish,
2063
            AGMediaEngineLoaded,
2064
            AGMediaEngineLoaded,
2064
            AGMediaEngineStartCall,
2065
            AGMediaEngineStartCall,
2065
            AGIntervalTest,
2066
            AGIntervalTest,
2066
-           AGAudioMixingStateChanged,
2067
            AGLastmileProbeTestResult,
2067
            AGLastmileProbeTestResult,
2068
            AGRtmpStreamingStateChanged,
2068
            AGRtmpStreamingStateChanged,
2069
            AGLocalVideoChanged,
2069
            AGLocalVideoChanged,
2435
                                                     }];
2435
                                                     }];
2436
 }
2436
 }
2437
 
2437
 
2438
-- (void)rtcEngineLocalAudioMixingDidFinish:(AgoraRtcEngineKit *_Nonnull)engine {
2439
-  [self sendEvent:AGLocalAudioMixingFinish params:@{
2440
-                                                     @"message": @"LocalAudioMixingSucceedFinish"
2441
-                                                     }];
2442
-}
2443
-
2444
 - (void)rtcEngineRemoteAudioMixingDidStart:(AgoraRtcEngineKit *_Nonnull)engine {
2438
 - (void)rtcEngineRemoteAudioMixingDidStart:(AgoraRtcEngineKit *_Nonnull)engine {
2445
   [self sendEvent:AGRemoteAudioMixingStart params:@{
2439
   [self sendEvent:AGRemoteAudioMixingStart params:@{
2446
                                                      @"message": @"RemoteAudioMixingStarted"
2440
                                                      @"message": @"RemoteAudioMixingStarted"