agora-electron-sdk 4.4.0-dev.1 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/js/AgoraSdk.js +1 -1
  3. package/js/Private/AgoraBase.js +28 -28
  4. package/js/Private/AgoraMediaBase.js +30 -4
  5. package/js/Private/IAgoraLog.js +4 -0
  6. package/js/Private/IAgoraRhythmPlayer.js +12 -12
  7. package/js/Private/IAgoraRtcEngine.js +64 -64
  8. package/js/Private/impl/IAgoraRtcEngineImpl.js +0 -32
  9. package/js/Private/internal/RtcEngineExInternal.js +9 -3
  10. package/js/Renderer/AgoraView.js +21 -2
  11. package/js/Renderer/IRendererManager.js +15 -2
  12. package/js/Renderer/RendererCache.js +2 -2
  13. package/package.json +9 -5
  14. package/scripts/downloadPrebuild.js +9 -3
  15. package/ts/AgoraSdk.ts +1 -1
  16. package/ts/Private/AgoraBase.ts +35 -31
  17. package/ts/Private/AgoraMediaBase.ts +60 -40
  18. package/ts/Private/IAgoraLog.ts +4 -0
  19. package/ts/Private/IAgoraMediaEngine.ts +8 -19
  20. package/ts/Private/IAgoraMediaPlayer.ts +13 -12
  21. package/ts/Private/IAgoraMusicContentCenter.ts +13 -1
  22. package/ts/Private/IAgoraRhythmPlayer.ts +12 -12
  23. package/ts/Private/IAgoraRtcEngine.ts +296 -262
  24. package/ts/Private/IAgoraRtcEngineEx.ts +35 -34
  25. package/ts/Private/IAudioDeviceManager.ts +4 -4
  26. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +0 -42
  27. package/ts/Private/internal/RtcEngineExInternal.ts +7 -2
  28. package/ts/Renderer/AgoraView.ts +33 -4
  29. package/ts/Renderer/IRendererManager.ts +20 -2
  30. package/ts/Renderer/RendererCache.ts +2 -2
  31. package/ts/Types.ts +1 -1
  32. package/types/AgoraSdk.d.ts +1 -1
  33. package/types/Private/AgoraBase.d.ts +35 -31
  34. package/types/Private/AgoraBase.d.ts.map +1 -1
  35. package/types/Private/AgoraMediaBase.d.ts +59 -40
  36. package/types/Private/AgoraMediaBase.d.ts.map +1 -1
  37. package/types/Private/IAgoraLog.d.ts +5 -1
  38. package/types/Private/IAgoraLog.d.ts.map +1 -1
  39. package/types/Private/IAgoraMediaEngine.d.ts +8 -19
  40. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
  41. package/types/Private/IAgoraMediaPlayer.d.ts +13 -12
  42. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
  43. package/types/Private/IAgoraMusicContentCenter.d.ts +13 -1
  44. package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -1
  45. package/types/Private/IAgoraRhythmPlayer.d.ts +12 -12
  46. package/types/Private/IAgoraRtcEngine.d.ts +296 -260
  47. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
  48. package/types/Private/IAgoraRtcEngineEx.d.ts +35 -34
  49. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
  50. package/types/Private/IAudioDeviceManager.d.ts +4 -4
  51. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +0 -4
  52. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
  53. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
  54. package/types/Renderer/AgoraView.d.ts +8 -2
  55. package/types/Renderer/AgoraView.d.ts.map +1 -1
  56. package/types/Renderer/IRendererManager.d.ts.map +1 -1
  57. package/types/Renderer/RendererCache.d.ts +1 -1
  58. package/types/Renderer/RendererCache.d.ts.map +1 -1
  59. package/types/Types.d.ts +1 -1
  60. package/types/Types.d.ts.map +1 -1
@@ -665,132 +665,132 @@ var MediaDeviceStateType;
665
665
  MediaDeviceStateType[MediaDeviceStateType["MediaDeviceStateUnplugged"] = 8] = "MediaDeviceStateUnplugged";
666
666
  })(MediaDeviceStateType = exports.MediaDeviceStateType || (exports.MediaDeviceStateType = {}));
667
667
  /**
668
- * Video profile.
668
+ * @ignore
669
669
  */
670
670
  var VideoProfileType;
671
671
  (function (VideoProfileType) {
672
672
  /**
673
- * 0: 160 × 120, frame rate 15 fps, bitrate 65 Kbps.
673
+ * @ignore
674
674
  */
675
675
  VideoProfileType[VideoProfileType["VideoProfileLandscape120p"] = 0] = "VideoProfileLandscape120p";
676
676
  /**
677
- * 2: 120 × 120, frame rate 15 fps, bitrate 50 Kbps.
677
+ * @ignore
678
678
  */
679
679
  VideoProfileType[VideoProfileType["VideoProfileLandscape120p3"] = 2] = "VideoProfileLandscape120p3";
680
680
  /**
681
- * 10: 320 × 180, frame rate 15 fps, bitrate 140 Kbps.
681
+ * @ignore
682
682
  */
683
683
  VideoProfileType[VideoProfileType["VideoProfileLandscape180p"] = 10] = "VideoProfileLandscape180p";
684
684
  /**
685
- * 12: 180 × 180, frame rate 15 fps, bitrate 100 Kbps.
685
+ * @ignore
686
686
  */
687
687
  VideoProfileType[VideoProfileType["VideoProfileLandscape180p3"] = 12] = "VideoProfileLandscape180p3";
688
688
  /**
689
- * 13: 240 × 180, frame rate 15 fps, bitrate 120 Kbps.
689
+ * @ignore
690
690
  */
691
691
  VideoProfileType[VideoProfileType["VideoProfileLandscape180p4"] = 13] = "VideoProfileLandscape180p4";
692
692
  /**
693
- * 20: 320 × 240, frame rate 15 fps, bitrate 200 Kbps.
693
+ * @ignore
694
694
  */
695
695
  VideoProfileType[VideoProfileType["VideoProfileLandscape240p"] = 20] = "VideoProfileLandscape240p";
696
696
  /**
697
- * 22: 240 × 240, frame rate 15 fps, bitrate 140 Kbps.
697
+ * @ignore
698
698
  */
699
699
  VideoProfileType[VideoProfileType["VideoProfileLandscape240p3"] = 22] = "VideoProfileLandscape240p3";
700
700
  /**
701
- * 23: 424 × 240, frame rate 15 fps, bitrate 220 Kbps.
701
+ * @ignore
702
702
  */
703
703
  VideoProfileType[VideoProfileType["VideoProfileLandscape240p4"] = 23] = "VideoProfileLandscape240p4";
704
704
  /**
705
- * 30: 640 × 360, frame rate 15 fps, bitrate 400 Kbps.
705
+ * @ignore
706
706
  */
707
707
  VideoProfileType[VideoProfileType["VideoProfileLandscape360p"] = 30] = "VideoProfileLandscape360p";
708
708
  /**
709
- * 32: 360 × 360, frame rate 15 fps, bitrate 260 Kbps.
709
+ * @ignore
710
710
  */
711
711
  VideoProfileType[VideoProfileType["VideoProfileLandscape360p3"] = 32] = "VideoProfileLandscape360p3";
712
712
  /**
713
- * 33: 640 × 360, frame rate 30 fps, bitrate 600 Kbps.
713
+ * @ignore
714
714
  */
715
715
  VideoProfileType[VideoProfileType["VideoProfileLandscape360p4"] = 33] = "VideoProfileLandscape360p4";
716
716
  /**
717
- * 35: 360 × 360, frame rate 30 fps, bitrate 400 Kbps.
717
+ * @ignore
718
718
  */
719
719
  VideoProfileType[VideoProfileType["VideoProfileLandscape360p6"] = 35] = "VideoProfileLandscape360p6";
720
720
  /**
721
- * 36: 480 × 360, frame rate 15 fps, bitrate 320 Kbps.
721
+ * @ignore
722
722
  */
723
723
  VideoProfileType[VideoProfileType["VideoProfileLandscape360p7"] = 36] = "VideoProfileLandscape360p7";
724
724
  /**
725
- * 37: 480 × 360, frame rate 30 fps, bitrate 490 Kbps.
725
+ * @ignore
726
726
  */
727
727
  VideoProfileType[VideoProfileType["VideoProfileLandscape360p8"] = 37] = "VideoProfileLandscape360p8";
728
728
  /**
729
- * 38: 640 × 360, frame rate 15 fps, bitrate 800 Kbps. This profile applies only to the live streaming channel profile.
729
+ * @ignore
730
730
  */
731
731
  VideoProfileType[VideoProfileType["VideoProfileLandscape360p9"] = 38] = "VideoProfileLandscape360p9";
732
732
  /**
733
- * 39: 640 × 360, frame rate 24 fps, bitrate 800 Kbps. This profile applies only to the live streaming channel profile.
733
+ * @ignore
734
734
  */
735
735
  VideoProfileType[VideoProfileType["VideoProfileLandscape360p10"] = 39] = "VideoProfileLandscape360p10";
736
736
  /**
737
- * 100: 640 × 360, frame rate 24 fps, bitrate 1000 Kbps. This profile applies only to the live streaming channel profile.
737
+ * @ignore
738
738
  */
739
739
  VideoProfileType[VideoProfileType["VideoProfileLandscape360p11"] = 100] = "VideoProfileLandscape360p11";
740
740
  /**
741
- * 40: 640 × 480, frame rate 15 fps, bitrate 500 Kbps.
741
+ * @ignore
742
742
  */
743
743
  VideoProfileType[VideoProfileType["VideoProfileLandscape480p"] = 40] = "VideoProfileLandscape480p";
744
744
  /**
745
- * 42: 480 × 480, frame rate 15 fps, bitrate 400 Kbps.
745
+ * @ignore
746
746
  */
747
747
  VideoProfileType[VideoProfileType["VideoProfileLandscape480p3"] = 42] = "VideoProfileLandscape480p3";
748
748
  /**
749
- * 43: 640 × 480, frame rate 30 fps, bitrate 750 Kbps.
749
+ * @ignore
750
750
  */
751
751
  VideoProfileType[VideoProfileType["VideoProfileLandscape480p4"] = 43] = "VideoProfileLandscape480p4";
752
752
  /**
753
- * 45: 480 × 480, frame rate 30 fps, bitrate 600 Kbps.
753
+ * @ignore
754
754
  */
755
755
  VideoProfileType[VideoProfileType["VideoProfileLandscape480p6"] = 45] = "VideoProfileLandscape480p6";
756
756
  /**
757
- * 47: 848 × 480, frame rate 15 fps, bitrate 610 Kbps.
757
+ * @ignore
758
758
  */
759
759
  VideoProfileType[VideoProfileType["VideoProfileLandscape480p8"] = 47] = "VideoProfileLandscape480p8";
760
760
  /**
761
- * 48: 848 × 480, frame rate 30 fps, bitrate 930 Kbps.
761
+ * @ignore
762
762
  */
763
763
  VideoProfileType[VideoProfileType["VideoProfileLandscape480p9"] = 48] = "VideoProfileLandscape480p9";
764
764
  /**
765
- * 49: 640 × 480, frame rate 10 fps, bitrate 400 Kbps.
765
+ * @ignore
766
766
  */
767
767
  VideoProfileType[VideoProfileType["VideoProfileLandscape480p10"] = 49] = "VideoProfileLandscape480p10";
768
768
  /**
769
- * 50: 1280 × 720, frame rate 15 fps, bitrate 1130 Kbps.
769
+ * @ignore
770
770
  */
771
771
  VideoProfileType[VideoProfileType["VideoProfileLandscape720p"] = 50] = "VideoProfileLandscape720p";
772
772
  /**
773
- * 52: 1280 × 720, frame rate 30 fps, bitrate 1710 Kbps.
773
+ * @ignore
774
774
  */
775
775
  VideoProfileType[VideoProfileType["VideoProfileLandscape720p3"] = 52] = "VideoProfileLandscape720p3";
776
776
  /**
777
- * 54: 960 × 720, frame rate 15 fps, bitrate 910 Kbps.
777
+ * @ignore
778
778
  */
779
779
  VideoProfileType[VideoProfileType["VideoProfileLandscape720p5"] = 54] = "VideoProfileLandscape720p5";
780
780
  /**
781
- * 55: 960 × 720, frame rate 30 fps, bitrate 1380 Kbps.
781
+ * @ignore
782
782
  */
783
783
  VideoProfileType[VideoProfileType["VideoProfileLandscape720p6"] = 55] = "VideoProfileLandscape720p6";
784
784
  /**
785
- * 60: 1920 × 1080, frame rate 15 fps, bitrate 2080 Kbps.
785
+ * @ignore
786
786
  */
787
787
  VideoProfileType[VideoProfileType["VideoProfileLandscape1080p"] = 60] = "VideoProfileLandscape1080p";
788
788
  /**
789
- * 60: 1920 × 1080, frame rate 30 fps, bitrate 3150 Kbps.
789
+ * @ignore
790
790
  */
791
791
  VideoProfileType[VideoProfileType["VideoProfileLandscape1080p3"] = 62] = "VideoProfileLandscape1080p3";
792
792
  /**
793
- * 64: 1920 × 1080, frame rate 60 fps, bitrate 4780 Kbps.
793
+ * @ignore
794
794
  */
795
795
  VideoProfileType[VideoProfileType["VideoProfileLandscape1080p5"] = 64] = "VideoProfileLandscape1080p5";
796
796
  /**
@@ -810,127 +810,127 @@ var VideoProfileType;
810
810
  */
811
811
  VideoProfileType[VideoProfileType["VideoProfileLandscape4k3"] = 72] = "VideoProfileLandscape4k3";
812
812
  /**
813
- * 1000: 120 × 160, frame rate 15 fps, bitrate 65 Kbps.
813
+ * @ignore
814
814
  */
815
815
  VideoProfileType[VideoProfileType["VideoProfilePortrait120p"] = 1000] = "VideoProfilePortrait120p";
816
816
  /**
817
- * 1002: 120 × 120, frame rate 15 fps, bitrate 50 Kbps.
817
+ * @ignore
818
818
  */
819
819
  VideoProfileType[VideoProfileType["VideoProfilePortrait120p3"] = 1002] = "VideoProfilePortrait120p3";
820
820
  /**
821
- * 1010: 180 × 320, frame rate 15 fps, bitrate 140 Kbps.
821
+ * @ignore
822
822
  */
823
823
  VideoProfileType[VideoProfileType["VideoProfilePortrait180p"] = 1010] = "VideoProfilePortrait180p";
824
824
  /**
825
- * 1012: 180 × 180, frame rate 15 fps, bitrate 100 Kbps.
825
+ * @ignore
826
826
  */
827
827
  VideoProfileType[VideoProfileType["VideoProfilePortrait180p3"] = 1012] = "VideoProfilePortrait180p3";
828
828
  /**
829
- * 1013: 180 × 240, frame rate 15 fps, bitrate 120 Kbps.
829
+ * @ignore
830
830
  */
831
831
  VideoProfileType[VideoProfileType["VideoProfilePortrait180p4"] = 1013] = "VideoProfilePortrait180p4";
832
832
  /**
833
- * 1020: 240 × 320, frame rate 15 fps, bitrate 200 Kbps.
833
+ * @ignore
834
834
  */
835
835
  VideoProfileType[VideoProfileType["VideoProfilePortrait240p"] = 1020] = "VideoProfilePortrait240p";
836
836
  /**
837
- * 1022: 240 × 240, frame rate 15 fps, bitrate 140 Kbps.
837
+ * @ignore
838
838
  */
839
839
  VideoProfileType[VideoProfileType["VideoProfilePortrait240p3"] = 1022] = "VideoProfilePortrait240p3";
840
840
  /**
841
- * 1023: 240 × 424, frame rate 15 fps, bitrate 220 Kbps.
841
+ * @ignore
842
842
  */
843
843
  VideoProfileType[VideoProfileType["VideoProfilePortrait240p4"] = 1023] = "VideoProfilePortrait240p4";
844
844
  /**
845
- * 1030: 360 × 640, frame rate 15 fps, bitrate 400 Kbps.
845
+ * @ignore
846
846
  */
847
847
  VideoProfileType[VideoProfileType["VideoProfilePortrait360p"] = 1030] = "VideoProfilePortrait360p";
848
848
  /**
849
- * 1032: 360 × 360, frame rate 15 fps, bitrate 260 Kbps.
849
+ * @ignore
850
850
  */
851
851
  VideoProfileType[VideoProfileType["VideoProfilePortrait360p3"] = 1032] = "VideoProfilePortrait360p3";
852
852
  /**
853
- * 1033: 360 × 640, frame rate 15 fps, bitrate 600 Kbps.
853
+ * @ignore
854
854
  */
855
855
  VideoProfileType[VideoProfileType["VideoProfilePortrait360p4"] = 1033] = "VideoProfilePortrait360p4";
856
856
  /**
857
- * 1035: 360 × 360, frame rate 30 fps, bitrate 400 Kbps.
857
+ * @ignore
858
858
  */
859
859
  VideoProfileType[VideoProfileType["VideoProfilePortrait360p6"] = 1035] = "VideoProfilePortrait360p6";
860
860
  /**
861
- * 1036: 360 × 480, frame rate 15 fps, bitrate 320 Kbps.
861
+ * @ignore
862
862
  */
863
863
  VideoProfileType[VideoProfileType["VideoProfilePortrait360p7"] = 1036] = "VideoProfilePortrait360p7";
864
864
  /**
865
- * 1037: 360 × 480, frame rate 30 fps, bitrate 490 Kbps.
865
+ * @ignore
866
866
  */
867
867
  VideoProfileType[VideoProfileType["VideoProfilePortrait360p8"] = 1037] = "VideoProfilePortrait360p8";
868
868
  /**
869
- * 1038: 360 × 640, frame rate 15 fps, bitrate 800 Kbps. This profile applies only to the live streaming channel profile.
869
+ * @ignore
870
870
  */
871
871
  VideoProfileType[VideoProfileType["VideoProfilePortrait360p9"] = 1038] = "VideoProfilePortrait360p9";
872
872
  /**
873
- * 1039: 360 × 640, frame rate 24 fps, bitrate 800 Kbps. This profile applies only to the live streaming channel profile.
873
+ * @ignore
874
874
  */
875
875
  VideoProfileType[VideoProfileType["VideoProfilePortrait360p10"] = 1039] = "VideoProfilePortrait360p10";
876
876
  /**
877
- * 1100: 360 × 640, frame rate 24 fps, bitrate 1000 Kbps. This profile applies only to the live streaming channel profile.
877
+ * @ignore
878
878
  */
879
879
  VideoProfileType[VideoProfileType["VideoProfilePortrait360p11"] = 1100] = "VideoProfilePortrait360p11";
880
880
  /**
881
- * 1040: 480 × 640, frame rate 15 fps, bitrate 500 Kbps.
881
+ * @ignore
882
882
  */
883
883
  VideoProfileType[VideoProfileType["VideoProfilePortrait480p"] = 1040] = "VideoProfilePortrait480p";
884
884
  /**
885
- * 1042: 480 × 480, frame rate 15 fps, bitrate 400 Kbps.
885
+ * @ignore
886
886
  */
887
887
  VideoProfileType[VideoProfileType["VideoProfilePortrait480p3"] = 1042] = "VideoProfilePortrait480p3";
888
888
  /**
889
- * 1043: 480 × 640, frame rate 30 fps, bitrate 750 Kbps.
889
+ * @ignore
890
890
  */
891
891
  VideoProfileType[VideoProfileType["VideoProfilePortrait480p4"] = 1043] = "VideoProfilePortrait480p4";
892
892
  /**
893
- * 1045: 480 × 480, frame rate 30 fps, bitrate 600 Kbps.
893
+ * @ignore
894
894
  */
895
895
  VideoProfileType[VideoProfileType["VideoProfilePortrait480p6"] = 1045] = "VideoProfilePortrait480p6";
896
896
  /**
897
- * 1047: 480 × 848, frame rate 15 fps, bitrate 610 Kbps.
897
+ * @ignore
898
898
  */
899
899
  VideoProfileType[VideoProfileType["VideoProfilePortrait480p8"] = 1047] = "VideoProfilePortrait480p8";
900
900
  /**
901
- * 1048: 480 × 848, frame rate 30 fps, bitrate 930 Kbps.
901
+ * @ignore
902
902
  */
903
903
  VideoProfileType[VideoProfileType["VideoProfilePortrait480p9"] = 1048] = "VideoProfilePortrait480p9";
904
904
  /**
905
- * 1049: 480 × 640, frame rate 10 fps, bitrate 400 Kbps.
905
+ * @ignore
906
906
  */
907
907
  VideoProfileType[VideoProfileType["VideoProfilePortrait480p10"] = 1049] = "VideoProfilePortrait480p10";
908
908
  /**
909
- * 1050: 720 × 1280, frame rate 15 fps, bitrate 1130 Kbps.
909
+ * @ignore
910
910
  */
911
911
  VideoProfileType[VideoProfileType["VideoProfilePortrait720p"] = 1050] = "VideoProfilePortrait720p";
912
912
  /**
913
- * 1052: 720 × 1280, frame rate 30 fps, bitrate 1710 Kbps.
913
+ * @ignore
914
914
  */
915
915
  VideoProfileType[VideoProfileType["VideoProfilePortrait720p3"] = 1052] = "VideoProfilePortrait720p3";
916
916
  /**
917
- * 1054: 720 × 960, frame rate 15 fps, bitrate 910 Kbps.
917
+ * @ignore
918
918
  */
919
919
  VideoProfileType[VideoProfileType["VideoProfilePortrait720p5"] = 1054] = "VideoProfilePortrait720p5";
920
920
  /**
921
- * 1055: 720 × 960, frame rate 30 fps, bitrate 1380 Kbps.
921
+ * @ignore
922
922
  */
923
923
  VideoProfileType[VideoProfileType["VideoProfilePortrait720p6"] = 1055] = "VideoProfilePortrait720p6";
924
924
  /**
925
- * 1060: 1080 × 1920, frame rate 15 fps, bitrate 2080 Kbps.
925
+ * @ignore
926
926
  */
927
927
  VideoProfileType[VideoProfileType["VideoProfilePortrait1080p"] = 1060] = "VideoProfilePortrait1080p";
928
928
  /**
929
- * 1062: 1080 × 1920, frame rate 30 fps, bitrate 3150 Kbps.
929
+ * @ignore
930
930
  */
931
931
  VideoProfileType[VideoProfileType["VideoProfilePortrait1080p3"] = 1062] = "VideoProfilePortrait1080p3";
932
932
  /**
933
- * 1064: 1080 × 1920, frame rate 60 fps, bitrate 4780 Kbps.
933
+ * @ignore
934
934
  */
935
935
  VideoProfileType[VideoProfileType["VideoProfilePortrait1080p5"] = 1064] = "VideoProfilePortrait1080p5";
936
936
  /**
@@ -950,7 +950,7 @@ var VideoProfileType;
950
950
  */
951
951
  VideoProfileType[VideoProfileType["VideoProfilePortrait4k3"] = 1072] = "VideoProfilePortrait4k3";
952
952
  /**
953
- * (Default) 640 × 360, frame rate 15 fps, bitrate 400 Kbps.
953
+ * @ignore
954
954
  */
955
955
  VideoProfileType[VideoProfileType["VideoProfileDefault"] = 30] = "VideoProfileDefault";
956
956
  })(VideoProfileType = exports.VideoProfileType || (exports.VideoProfileType = {}));
@@ -1315,22 +1315,6 @@ class IRtcEngineImpl {
1315
1315
  getApiTypeFromMuteAllRemoteAudioStreams(mute) {
1316
1316
  return 'RtcEngine_muteAllRemoteAudioStreams_5039d15';
1317
1317
  }
1318
- setDefaultMuteAllRemoteAudioStreams(mute) {
1319
- const apiType = this.getApiTypeFromSetDefaultMuteAllRemoteAudioStreams(mute);
1320
- const jsonParams = {
1321
- mute: mute,
1322
- toJSON: () => {
1323
- return {
1324
- mute: mute,
1325
- };
1326
- },
1327
- };
1328
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
1329
- return jsonResults.result;
1330
- }
1331
- getApiTypeFromSetDefaultMuteAllRemoteAudioStreams(mute) {
1332
- return 'RtcEngine_setDefaultMuteAllRemoteAudioStreams_5039d15';
1333
- }
1334
1318
  muteRemoteAudioStream(uid, mute) {
1335
1319
  const apiType = this.getApiTypeFromMuteRemoteAudioStream(uid, mute);
1336
1320
  const jsonParams = {
@@ -1397,22 +1381,6 @@ class IRtcEngineImpl {
1397
1381
  getApiTypeFromMuteAllRemoteVideoStreams(mute) {
1398
1382
  return 'RtcEngine_muteAllRemoteVideoStreams_5039d15';
1399
1383
  }
1400
- setDefaultMuteAllRemoteVideoStreams(mute) {
1401
- const apiType = this.getApiTypeFromSetDefaultMuteAllRemoteVideoStreams(mute);
1402
- const jsonParams = {
1403
- mute: mute,
1404
- toJSON: () => {
1405
- return {
1406
- mute: mute,
1407
- };
1408
- },
1409
- };
1410
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
1411
- return jsonResults.result;
1412
- }
1413
- getApiTypeFromSetDefaultMuteAllRemoteVideoStreams(mute) {
1414
- return 'RtcEngine_setDefaultMuteAllRemoteVideoStreams_5039d15';
1415
- }
1416
1384
  setRemoteDefaultVideoStreamType(streamType) {
1417
1385
  const apiType = this.getApiTypeFromSetRemoteDefaultVideoStreamType(streamType);
1418
1386
  const jsonParams = {
@@ -5,8 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.RtcEngineExInternal = void 0;
7
7
  const ts_interface_checker_1 = require("ts-interface-checker");
8
- const RendererManager_1 = require("../../Renderer/RendererManager");
9
8
  const Utils_1 = require("../../Utils");
9
+ let RendererManager;
10
+ if (typeof window !== 'undefined') {
11
+ RendererManager = require('../../Renderer/RendererManager').RendererManager;
12
+ }
13
+ else {
14
+ RendererManager = undefined;
15
+ }
10
16
  const AgoraBase_1 = require("../AgoraBase");
11
17
  const AgoraMediaBase_1 = require("../AgoraMediaBase");
12
18
  const IAgoraRtcEngineExImpl_1 = require("../impl/IAgoraRtcEngineExImpl");
@@ -37,8 +43,8 @@ class RtcEngineExInternal extends IAgoraRtcEngineExImpl_1.IRtcEngineExImpl {
37
43
  if (Utils_1.AgoraEnv.webEnvReady) {
38
44
  // @ts-ignore
39
45
  window.AgoraEnv = Utils_1.AgoraEnv;
40
- if (Utils_1.AgoraEnv.AgoraRendererManager === undefined) {
41
- Utils_1.AgoraEnv.AgoraRendererManager = new RendererManager_1.RendererManager();
46
+ if (Utils_1.AgoraEnv.AgoraRendererManager === undefined && RendererManager) {
47
+ Utils_1.AgoraEnv.AgoraRendererManager = new RendererManager();
42
48
  }
43
49
  }
44
50
  const ret = super.initialize(context);
@@ -6,12 +6,14 @@ const Utils_1 = require("../Utils");
6
6
  const VIDEO_SOURCE_TYPE_STRING = 'video-source-type';
7
7
  const UID_STRING = 'uid';
8
8
  const CHANNEL_ID_STRING = 'channel-id';
9
+ const POSITION_STRING = 'position';
9
10
  const RENDERER_CONTENT_MODE_STRING = 'renderer-content-mode';
10
11
  const RENDERER_MIRROR_STRING = 'renderer-mirror';
11
12
  const observedAttributes = [
12
13
  VIDEO_SOURCE_TYPE_STRING,
13
14
  UID_STRING,
14
15
  CHANNEL_ID_STRING,
16
+ POSITION_STRING,
15
17
  RENDERER_CONTENT_MODE_STRING,
16
18
  RENDERER_MIRROR_STRING,
17
19
  ];
@@ -54,6 +56,21 @@ class AgoraView extends HTMLElement {
54
56
  this.removeAttribute(CHANNEL_ID_STRING);
55
57
  }
56
58
  }
59
+ get position() {
60
+ const number = Number(this.getAttribute(POSITION_STRING));
61
+ return isNaN(number)
62
+ ? AgoraMediaBase_1.VideoModulePosition.PositionPreEncoder |
63
+ AgoraMediaBase_1.VideoModulePosition.PositionPreRenderer
64
+ : number;
65
+ }
66
+ set position(val) {
67
+ if (val) {
68
+ this.setAttribute(POSITION_STRING, String(val));
69
+ }
70
+ else {
71
+ this.removeAttribute(POSITION_STRING);
72
+ }
73
+ }
57
74
  get renderMode() {
58
75
  const number = Number(this.getAttribute(RENDERER_CONTENT_MODE_STRING) ||
59
76
  AgoraMediaBase_1.RenderModeType.RenderModeFit);
@@ -82,12 +99,13 @@ class AgoraView extends HTMLElement {
82
99
  super();
83
100
  this.isConnectedCallback = false;
84
101
  this.initializeRender = () => {
85
- const { channelId, uid, sourceType, renderMode, renderMirror } = this;
102
+ const { channelId, uid, sourceType, position, renderMode, renderMirror } = this;
86
103
  Utils_1.AgoraEnv.AgoraRendererManager?.addOrRemoveRenderer({
87
104
  sourceType,
88
105
  view: this,
89
106
  uid,
90
107
  channelId,
108
+ position,
91
109
  renderMode,
92
110
  mirrorMode: renderMirror
93
111
  ? AgoraBase_1.VideoMirrorModeType.VideoMirrorModeEnabled
@@ -96,9 +114,10 @@ class AgoraView extends HTMLElement {
96
114
  });
97
115
  };
98
116
  this.destroyRender = () => {
99
- const { channelId, uid, sourceType } = this;
117
+ const { channelId, uid, sourceType, position } = this;
100
118
  Utils_1.AgoraEnv.AgoraRendererManager?.removeRendererFromCache({
101
119
  channelId,
120
+ position,
102
121
  uid,
103
122
  sourceType,
104
123
  view: this,
@@ -48,7 +48,7 @@ class IRendererManager {
48
48
  this.clearRendererCache();
49
49
  }
50
50
  precheckRendererContext(context) {
51
- let { sourceType, uid, channelId, mediaPlayerId, renderMode = this.defaultRenderMode, mirrorMode = this.defaultMirrorMode, } = context;
51
+ let { sourceType, uid, channelId, position, mediaPlayerId, renderMode = this.defaultRenderMode, mirrorMode = this.defaultMirrorMode, } = context;
52
52
  switch (sourceType) {
53
53
  case AgoraMediaBase_1.VideoSourceType.VideoSourceRemote:
54
54
  if (uid === undefined) {
@@ -73,7 +73,20 @@ class IRendererManager {
73
73
  uid = 0;
74
74
  break;
75
75
  }
76
- return { ...context, sourceType, uid, channelId, renderMode, mirrorMode };
76
+ if (!position) {
77
+ position =
78
+ AgoraMediaBase_1.VideoModulePosition.PositionPreEncoder |
79
+ AgoraMediaBase_1.VideoModulePosition.PositionPreRenderer;
80
+ }
81
+ return {
82
+ ...context,
83
+ position,
84
+ sourceType,
85
+ uid,
86
+ channelId,
87
+ renderMode,
88
+ mirrorMode,
89
+ };
77
90
  }
78
91
  addOrRemoveRenderer(context) {
79
92
  // To be compatible with the old API
@@ -7,7 +7,7 @@ function generateRendererCacheKey({ channelId, uid, sourceType, }) {
7
7
  }
8
8
  exports.generateRendererCacheKey = generateRendererCacheKey;
9
9
  class RendererCache {
10
- constructor({ channelId, uid, sourceType }) {
10
+ constructor({ channelId, uid, sourceType, position }) {
11
11
  this._renderers = [];
12
12
  this._videoFrame = {
13
13
  yBuffer: Buffer.alloc(0),
@@ -20,7 +20,7 @@ class RendererCache {
20
20
  vStride: 0,
21
21
  rotation: 0,
22
22
  };
23
- this._context = { channelId, uid, sourceType };
23
+ this._context = { channelId, uid, sourceType, position };
24
24
  this._enabled = false;
25
25
  }
26
26
  get key() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-electron-sdk",
3
- "version": "4.4.0-dev.1",
3
+ "version": "4.4.0",
4
4
  "description": "agora-electron-sdk",
5
5
  "main": "js/AgoraSdk",
6
6
  "types": "types/AgoraSdk.d.ts",
@@ -91,7 +91,11 @@
91
91
  "node": ">= 14.0.0"
92
92
  },
93
93
  "jest": {
94
+ "setupFilesAfterEnv": [
95
+ "<rootDir>/ts/__tests__/setup.ts"
96
+ ],
94
97
  "modulePathIgnorePatterns": [
98
+ "<rootDir>/ts/__tests__/setup.ts",
95
99
  "<rootDir>/example/node_modules",
96
100
  "<rootDir>/js/",
97
101
  "<rootDir>/types/"
@@ -138,9 +142,9 @@
138
142
  "yuv-canvas": "1.2.6"
139
143
  },
140
144
  "agora_electron": {
141
- "iris_sdk_win": "https://download.agora.io/sdk/release/iris_4.4.0-dev.4_DCG_Windows_Video_Standalone_20240624_0313_450.zip",
142
- "iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.4.0-dev.4_DCG_Mac_Video_Standalone_20240624_0313_413.zip",
143
- "native_sdk_win": "https://download.agora.io/sdk/release/AgoraRtcEngine_windows_Preview_4.4.0-dev.4.zip",
144
- "native_sdk_mac": "https://download.agora.io/sdk/release/AgoraRtcEngine_macOS_Preview_4.4.0-dev.4.zip"
145
+ "iris_sdk_win": "https://download.agora.io/sdk/release/iris_4.4.0-build.6_DCG_Windows_Video_Standalone_20240823_1146_504.zip",
146
+ "iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.4.0-build.6_DCG_Mac_Video_Standalone_20240823_1146_468.zip",
147
+ "native_sdk_win": "https://download.agora.io/sdk/release/Agora_Native_SDK_for_Windows_v4.4.0_FULL.zip",
148
+ "native_sdk_mac": "https://download.agora.io/sdk/release/Agora_Native_SDK_for_Mac_v4.4.0_FULL.zip"
145
149
  }
146
150
  }
@@ -8,11 +8,17 @@ const getConfig = require('./getConfig');
8
8
  const logger = require('./logger');
9
9
  const { getOS } = require('./util');
10
10
 
11
- const { platform, arch, no_symbol, native_sdk_mac, native_sdk_win } =
12
- getConfig();
11
+ const {
12
+ platform,
13
+ packageVersion,
14
+ arch,
15
+ no_symbol,
16
+ native_sdk_mac,
17
+ native_sdk_win,
18
+ } = getConfig();
13
19
 
14
20
  const workspaceDir = `${path.join(__dirname, '..')}`;
15
- const packageVersion = '4.3.2';
21
+
16
22
  const normalizePath = (filePath) => filePath.split(path.sep).join('/');
17
23
 
18
24
  const getDownloadURL = () => {
package/ts/AgoraSdk.ts CHANGED
@@ -40,7 +40,7 @@ export function createAgoraRtcEngine(options?: AgoraEnvOptions): IRtcEngineEx {
40
40
  /**
41
41
  * Gets one IMediaPlayerCacheManager instance.
42
42
  *
43
- * When you successfully call this method, the SDK returns a media player cache manager instance. The cache manager is a singleton pattern. Therefore, multiple calls to this method returns the same instance. Make sure the IRtcEngine is initialized before you call this method.
43
+ * Before calling any APIs in the IMediaPlayerCacheManager class, you need to call this method to get a cache manager instance of a media player.
44
44
  *
45
45
  * @returns
46
46
  * The IMediaPlayerCacheManager instance.