Преглед на файлове

chore. update changelog

matrixbirds преди 5 години
родител
ревизия
ab98a5e2fe
променени са 4 файла, в които са добавени 43 реда и са изтрити 41 реда
  1. 14
    0
      CHANGELOG
  2. 24
    29
      android/src/main/java/com/syan/agora/AgoraModule.java
  3. 0
    1
      ios/RCTAgora/AgoraConst.h
  4. 5
    11
      ios/RCTAgora/RCTAgora.m

+ 14
- 0
CHANGELOG Целия файл

@@ -1,5 +1,19 @@
1 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 18
 #### 2.4.0-alpha
5 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 Целия файл

@@ -291,6 +291,7 @@ public class AgoraModule extends ReactContextBaseJavaModule {
291 291
     private final static String AGNetworkTypeChanged = "networkTypeChanged";
292 292
     private final static String AGFirstRemoteAudioDecoded = "firstRemoteAudioDecoded";
293 293
     private final static String AGMediaMetaDataReceived = "mediaMetaDataReceived";
294
+    private final static String AGLocalVideoChanged = "localVideoChanged";
294 295
     private final static String AGRemoteVideoStateChanged = "remoteVideoStateChanged";
295 296
     private final static String AGLocalPublishFallbackToAudioOnly = "localPublishFallbackToAudioOnly";
296 297
     private final static String AGRemoteSubscribeFallbackToAudioOnly = "remoteSubscribeFallbackToAudioOnly";
@@ -309,10 +310,10 @@ public class AgoraModule extends ReactContextBaseJavaModule {
309 310
     private final static String AGAudioTransportStatsOfUid = "audioTransportStatsOfUid";
310 311
     private final static String AGVideoTransportStatsOfUid = "videoTransportStatsOfUid";
311 312
 
312
-    private final static String AGLocalAudioMixingFinish = "localAudioMixingFinish";
313 313
     private final static String AGRemoteAudioMixingStart = "remoteAudioMixingStart";
314 314
     private final static String AGRemoteAudioMixingFinish = "remoteAudioMixingFinish";
315 315
     private final static String AGAudioEffectFinish = "audioEffectFinish";
316
+    private final static String AGAudioMixingStateChanged = "audioMixingStateChanged";
316 317
 
317 318
     private final static String AGStreamPublished = "streamPublished";
318 319
     private final static String AGStreamUnpublish = "streamUnpublish";
@@ -594,18 +595,6 @@ public class AgoraModule extends ReactContextBaseJavaModule {
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 598
         @Override
610 599
         public void onFirstLocalVideoFrame(final int width, final int height, final int elapsed) {
611 600
             runOnUiThread(new Runnable() {
@@ -809,18 +798,6 @@ public class AgoraModule extends ReactContextBaseJavaModule {
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 801
         @Override
825 802
         public void onCameraFocusAreaChanged(final Rect rect) {
826 803
             runOnUiThread(new Runnable() {
@@ -890,6 +867,8 @@ public class AgoraModule extends ReactContextBaseJavaModule {
890 867
                     statsMap.putInt("userCount", stats.users);
891 868
                     statsMap.putDouble("cpuAppUsage", stats.cpuAppUsage);
892 869
                     statsMap.putDouble("cpuTotalUsage", stats.cpuTotalUsage);
870
+                    statsMap.putInt("txPacketLossRate", stats.txPacketLossRate);
871
+                    statsMap.putInt("rxPacketLossRate", stats.rxPacketLossRate);
893 872
 
894 873
                     WritableMap map = Arguments.createMap();
895 874
                     map.putMap("stats", statsMap);
@@ -1002,13 +981,14 @@ public class AgoraModule extends ReactContextBaseJavaModule {
1002 981
         }
1003 982
 
1004 983
         @Override
1005
-        public void onAudioMixingFinished() {
984
+        public void onAudioMixingStateChanged(final int state, final int errorCode) {
1006 985
             runOnUiThread(new Runnable() {
1007 986
                 @Override
1008 987
                 public void run() {
1009 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,6 +1126,20 @@ public class AgoraModule extends ReactContextBaseJavaModule {
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 1145
     @ReactMethod
@@ -1769,7 +1763,8 @@ public class AgoraModule extends ReactContextBaseJavaModule {
1769 1763
             int res = AgoraManager.getInstance().mRtcEngine.getAudioMixingPlayoutVolume();
1770 1764
             if (res < 0) throw new ReactNativeAgoraException("getAudioMixingPlayoutVolume Failed", res);
1771 1765
             WritableMap map = Arguments.createMap();
1772
-            map.putString("volume", Integer.toString(res));
1766
+            map.putBoolean("success", true);
1767
+            map.putInt("value", res);
1773 1768
             promise.resolve(map);
1774 1769
         } catch (Exception e) {
1775 1770
             promise.reject("-1", e);

+ 0
- 1
ios/RCTAgora/AgoraConst.h Целия файл

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

+ 5
- 11
ios/RCTAgora/RCTAgora.m Целия файл

@@ -1981,8 +1981,9 @@ RCT_EXPORT_METHOD(sendMediaData:(NSString *)dataStr
1981 1981
 RCT_EXPORT_METHOD(registerMediaMetadataObserver
1982 1982
                   :(RCTPromiseResolveBlock)resolve
1983 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 1987
     resolve(@{
1987 1988
               @"success": @(YES)
1988 1989
               });
@@ -1991,7 +1992,7 @@ RCT_EXPORT_METHOD(registerMediaMetadataObserver
1991 1992
                                                                              @"code": @(-1),
1992 1993
                                                                              @"message":@{
1993 1994
                                                                                  @"success": @(NO),
1994
-                                                                                 @"value":[NSNumber numberWithInteger:res]
1995
+                                                                                 @"value":@(0)
1995 1996
                                                                                  }
1996 1997
                                                                              }]);
1997 1998
   }
@@ -2046,7 +2047,7 @@ RCT_EXPORT_METHOD(registerMediaMetadataObserver
2046 2047
            AGAudioTransportStatsOfUid,
2047 2048
            AGVideoTransportStatsOfUid,
2048 2049
            
2049
-           AGLocalAudioMixingFinish,
2050
+           AGAudioMixingStateChanged,
2050 2051
            AGRemoteAudioMixingStart,
2051 2052
            AGRemoteAudioMixingFinish,
2052 2053
            AGAudioEffectFinish,
@@ -2063,7 +2064,6 @@ RCT_EXPORT_METHOD(registerMediaMetadataObserver
2063 2064
            AGMediaEngineLoaded,
2064 2065
            AGMediaEngineStartCall,
2065 2066
            AGIntervalTest,
2066
-           AGAudioMixingStateChanged,
2067 2067
            AGLastmileProbeTestResult,
2068 2068
            AGRtmpStreamingStateChanged,
2069 2069
            AGLocalVideoChanged,
@@ -2435,12 +2435,6 @@ RCT_EXPORT_METHOD(registerMediaMetadataObserver
2435 2435
                                                     }];
2436 2436
 }
2437 2437
 
2438
-- (void)rtcEngineLocalAudioMixingDidFinish:(AgoraRtcEngineKit *_Nonnull)engine {
2439
-  [self sendEvent:AGLocalAudioMixingFinish params:@{
2440
-                                                     @"message": @"LocalAudioMixingSucceedFinish"
2441
-                                                     }];
2442
-}
2443
-
2444 2438
 - (void)rtcEngineRemoteAudioMixingDidStart:(AgoraRtcEngineKit *_Nonnull)engine {
2445 2439
   [self sendEvent:AGRemoteAudioMixingStart params:@{
2446 2440
                                                      @"message": @"RemoteAudioMixingStarted"