diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index c2807bef0..720118ef2 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -15,10 +15,9 @@ runs: with: bundler-cache: true - - name: Setup activesupport + - name: Setup by gem if: ${{ runner.os == 'macOS' }} - run: - gem install activesupport -v 7.0.8 + run: gem install 'activesupport:7.0.8' 'xcodeproj:1.25.1' shell: bash - name: Setup Cocoapods @@ -41,7 +40,7 @@ runs: - name: Install dependencies env: - POD_INSTALL: "0" + POD_INSTALL: '0' if: steps.yarn-cache.outputs.cache-hit != 'true' run: yarn install --immutable shell: bash diff --git a/README.md b/README.md index 028c3821a..bbfc2ac3a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ > NOTE: These sdk and samples only for the Agora Video 4.x APIs. For examples using previous releases please see the following branches: -> - [3.x](https://github.com/AgoraIO-Extensions/react-native-agora/tree/3.x) +> +> - [3.x](https://github.com/AgoraIO-Extensions/react-native-agora/tree/3.x) # react-native-agora @@ -46,10 +47,10 @@ pod install ## General Usage ```typescript -import {createAgoraRtcEngine} from 'react-native-agora'; +import { createAgoraRtcEngine } from 'react-native-agora'; const engine = createAgoraRtcEngine(); -engine.initialize({appId: 'YOUR APP ID'}); +engine.initialize({ appId: 'YOUR APP ID' }); ``` or @@ -57,15 +58,15 @@ or ```javascript const createAgoraRtcEngine = require('react-native-agora'); const engine = createAgoraRtcEngine(); -engine.initialize({appId: 'YOUR APP ID'}); +engine.initialize({ appId: 'YOUR APP ID' }); ``` ## Using TypeScript We suggest you use TypeScript to develop, or use TypeScript eslint to lint your code. -* [Getting Started with TypeScript](https://reactnative.dev/docs/typescript#getting-started-with-typescript) -* [Adding TypeScript to an Existing Project](https://reactnative.dev/docs/typescript#adding-typescript-to-an-existing-project) +- [Getting Started with TypeScript](https://reactnative.dev/docs/typescript#getting-started-with-typescript) +- [Adding TypeScript to an Existing Project](https://reactnative.dev/docs/typescript#adding-typescript-to-an-existing-project) ## Troubleshooting @@ -117,19 +118,37 @@ Fixed in React Native 0.59.9. Source: https://github.com/facebook/react-native/issues/25154 +### FOREGROUND_SERVICE_MEDIA_PROJECTION permission + +If you are not using screen sharing feature in your app, you should exclude Screen Sharing extension as below: + +``` +// build.gradle (project-level) +signingConfigs{ + .... +} + +configurations.configureEach { + exclude group: "io.agora.rtc", module: "full-screen-sharing" +} +compileOptions{ + ... +} +``` + ## API -* [React Native API](https://api-ref.agora.io/en/video-sdk/react-native/4.x/API/rtc_api_overview_ng.html) -* [Android API](https://api-ref.agora.io/en/video-sdk/android/4.x/API/rtc_api_overview_ng.html) -* [iOS API](https://api-ref.agora.io/en/video-sdk/ios/4.x/API/rtc_api_overview_ng.html) +- [React Native API](https://api-ref.agora.io/en/video-sdk/react-native/4.x/API/rtc_api_overview_ng.html) +- [Android API](https://api-ref.agora.io/en/video-sdk/android/4.x/API/rtc_api_overview_ng.html) +- [iOS API](https://api-ref.agora.io/en/video-sdk/ios/4.x/API/rtc_api_overview_ng.html) ## Resources -* Complete [API Doc](https://docs.agora.io/en/) at the Developer Center -* [Changelog](CHANGELOG.md) -* [Release Notes](https://docs.agora.io/en/video-calling/reference/release-notes?platform=react-native) -* [File bugs about this sample](https://github.com/AgoraIO-Extensions/react-native-agora/issues) -* [React Native Getting Started](https://facebook.github.io/react-native/docs/getting-started.html) +- Complete [API Doc](https://docs.agora.io/en/) at the Developer Center +- [Changelog](CHANGELOG.md) +- [Release Notes](https://docs.agora.io/en/video-calling/reference/release-notes?platform=react-native) +- [File bugs about this sample](https://github.com/AgoraIO-Extensions/react-native-agora/issues) +- [React Native Getting Started](https://facebook.github.io/react-native/docs/getting-started.html) ## Contributing diff --git a/android/build.gradle b/android/build.gradle index bd24c4daa..ee9346a61 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -164,9 +164,9 @@ dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs') - api 'io.agora.rtc:full-sdk:4.4.1' - implementation 'io.agora.rtc:full-screen-sharing:4.4.1' - implementation 'io.agora.rtc:iris-rtc:4.4.0-build.6' + api 'io.agora.rtc:agora-full-preview:4.5.0-dev.10' + implementation 'io.agora.rtc:full-screen-sharing-special:4.5.0-dev.10' + implementation 'io.agora.rtc:iris-rtc:4.5.0-dev.10' } if (isNewArchitectureEnabled()) { diff --git a/example/README.md b/example/README.md index 3a048059a..50876d996 100644 --- a/example/README.md +++ b/example/README.md @@ -31,7 +31,6 @@ Any scene of this project can run successfully alone. | [ChannelMediaRelay](./src/examples/advanced/ChannelMediaRelay) | Starts relaying media streams across channels. This method can be used to implement scenarios such as co-host across channels | | [ContentInspect](./src/examples/advanced/ContentInspect) | Content inspect | | [DirectCdnStreaming](./src/examples/advanced/DirectCdnStreaming) | Direct CDN streaming | -| [EncodedVideoFrame](./src/examples/advanced/EncodedVideoFrame) | Encoded video frame | | [Encryption](./src/examples/advanced/Encryption) | Enables/Disables the built-in encryption | | [Extension](./src/examples/advanced/Extension) | Enables/Disables extensions | | [JoinMultipleChannel](./src/examples/advanced/JoinMultipleChannel) | Joins a channel with the connection ID | diff --git a/example/ios/AgoraRtcNgExample.xcodeproj/project.pbxproj b/example/ios/AgoraRtcNgExample.xcodeproj/project.pbxproj index 571dc1d3f..83506a16e 100644 --- a/example/ios/AgoraRtcNgExample.xcodeproj/project.pbxproj +++ b/example/ios/AgoraRtcNgExample.xcodeproj/project.pbxproj @@ -884,7 +884,7 @@ INFOPLIST_FILE = ScreenShare/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = ScreenShare; INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -922,7 +922,7 @@ INFOPLIST_FILE = ScreenShare/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = ScreenShare; INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/example/ios/Podfile b/example/ios/Podfile index ee16a6479..498029cc9 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -62,5 +62,5 @@ target 'AgoraRtcNgExample' do end target 'ScreenShare' do - pod 'AgoraRtcEngine_iOS', '4.4.0' + pod 'AgoraRtcEngine_iOS_Preview', '4.5.0-dev.10' end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index eb99d3dfa..03f9a05a6 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,46 +1,6 @@ PODS: - - AgoraIrisRTC_iOS (4.4.0-build.6) - - AgoraRtcEngine_iOS (4.4.0): - - AgoraRtcEngine_iOS/AIAEC (= 4.4.0) - - AgoraRtcEngine_iOS/AIAECLL (= 4.4.0) - - AgoraRtcEngine_iOS/AINS (= 4.4.0) - - AgoraRtcEngine_iOS/AINSLL (= 4.4.0) - - AgoraRtcEngine_iOS/AudioBeauty (= 4.4.0) - - AgoraRtcEngine_iOS/Basic (= 4.4.0) - - AgoraRtcEngine_iOS/ClearVision (= 4.4.0) - - AgoraRtcEngine_iOS/ContentInspect (= 4.4.0) - - AgoraRtcEngine_iOS/FaceCapture (= 4.4.0) - - AgoraRtcEngine_iOS/FaceDetection (= 4.4.0) - - AgoraRtcEngine_iOS/LipSync (= 4.4.0) - - AgoraRtcEngine_iOS/ReplayKit (= 4.4.0) - - AgoraRtcEngine_iOS/RtcBasic (= 4.4.0) - - AgoraRtcEngine_iOS/SpatialAudio (= 4.4.0) - - AgoraRtcEngine_iOS/VideoAv1CodecDec (= 4.4.0) - - AgoraRtcEngine_iOS/VideoAv1CodecEnc (= 4.4.0) - - AgoraRtcEngine_iOS/VideoCodecDec (= 4.4.0) - - AgoraRtcEngine_iOS/VideoCodecEnc (= 4.4.0) - - AgoraRtcEngine_iOS/VirtualBackground (= 4.4.0) - - AgoraRtcEngine_iOS/VQA (= 4.4.0) - - AgoraRtcEngine_iOS/AIAEC (4.4.0) - - AgoraRtcEngine_iOS/AIAECLL (4.4.0) - - AgoraRtcEngine_iOS/AINS (4.4.0) - - AgoraRtcEngine_iOS/AINSLL (4.4.0) - - AgoraRtcEngine_iOS/AudioBeauty (4.4.0) - - AgoraRtcEngine_iOS/Basic (4.4.0) - - AgoraRtcEngine_iOS/ClearVision (4.4.0) - - AgoraRtcEngine_iOS/ContentInspect (4.4.0) - - AgoraRtcEngine_iOS/FaceCapture (4.4.0) - - AgoraRtcEngine_iOS/FaceDetection (4.4.0) - - AgoraRtcEngine_iOS/LipSync (4.4.0) - - AgoraRtcEngine_iOS/ReplayKit (4.4.0) - - AgoraRtcEngine_iOS/RtcBasic (4.4.0) - - AgoraRtcEngine_iOS/SpatialAudio (4.4.0) - - AgoraRtcEngine_iOS/VideoAv1CodecDec (4.4.0) - - AgoraRtcEngine_iOS/VideoAv1CodecEnc (4.4.0) - - AgoraRtcEngine_iOS/VideoCodecDec (4.4.0) - - AgoraRtcEngine_iOS/VideoCodecEnc (4.4.0) - - AgoraRtcEngine_iOS/VirtualBackground (4.4.0) - - AgoraRtcEngine_iOS/VQA (4.4.0) + - AgoraIrisRTC_iOS (4.5.0-dev.10) + - AgoraRtcEngine_iOS_Preview (4.5.0-dev.10) - boost (1.76.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) @@ -417,9 +377,9 @@ PODS: - React-jsinspector (0.72.12) - React-logger (0.72.12): - glog - - react-native-agora (4.3.2): - - AgoraIrisRTC_iOS (= 4.4.0-build.6) - - AgoraRtcEngine_iOS (= 4.4.0) + - react-native-agora (4.4.0): + - AgoraIrisRTC_iOS (= 4.5.0-dev.10) + - AgoraRtcEngine_iOS_Preview (= 4.5.0-dev.10) - RCT-Folly (= 2021.07.22.00) - React-Core - react-native-image-tools (0.8.1): @@ -557,7 +517,7 @@ PODS: - Yoga (~> 1.14) DEPENDENCIES: - - AgoraRtcEngine_iOS (= 4.4.0) + - AgoraRtcEngine_iOS_Preview (= 4.5.0-dev.10) - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) @@ -633,9 +593,9 @@ DEPENDENCIES: - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: - https://github.com/CocoaPods/Specs.git: + trunk: - AgoraIrisRTC_iOS - - AgoraRtcEngine_iOS + - AgoraRtcEngine_iOS_Preview - CocoaAsyncSocket - Flipper - Flipper-Boost-iOSX @@ -752,8 +712,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - AgoraIrisRTC_iOS: b28c8aa87cfa3eeec9be2bf1df35e6b5c28aaff1 - AgoraRtcEngine_iOS: 645039304ab4e32cb43506659056fb71f5d1a3b0 + AgoraIrisRTC_iOS: 688c9b555985c8674a93db90520029c7aaeec1bb + AgoraRtcEngine_iOS_Preview: 9fa86185b30c53ec1d3a7713022ff249300ad2c0 boost: 7dcd2de282d72e344012f7d6564d024930a6a440 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 @@ -787,7 +747,7 @@ SPEC CHECKSUMS: React-jsiexecutor: 95bdf0ab46024ca9849e08739b6abd8fe489cd33 React-jsinspector: 8e291ed0ab371314de269001d6b9b25db6aabf42 React-logger: d4010de0b0564e63637ad08373bc73b5d919974b - react-native-agora: e440bb9c0abad211ff7ab6877dd12f07252c5168 + react-native-agora: ae6574ef956922ea56915157d0da10dc96f693e7 react-native-image-tools: 88218449791389bbf550a2c475a3b564c8233c8b react-native-safe-area-context: 7aa8e6d9d0f3100a820efb1a98af68aa747f9284 react-native-slider: 1cdd6ba29675df21f30544253bf7351d3c2d68c4 @@ -818,6 +778,6 @@ SPEC CHECKSUMS: Yoga: 87e59f6d458e5061d2421086c5de994b3f7cd151 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: e6f852241acd4926e2d97e62a62ba5748df7ca3e +PODFILE CHECKSUM: 457b9fcbb1f82536b64371895e4a392dae8ede2b COCOAPODS: 1.13.0 diff --git a/example/package.json b/example/package.json index b36cad263..5c9832d34 100644 --- a/example/package.json +++ b/example/package.json @@ -24,7 +24,7 @@ "react-native-color-picker": "^0.6.0", "react-native-fs": "^2.20.0", "react-native-gesture-handler": "^2.9.0", - "react-native-image-tool": "github:LichKing-2234/react-native-image-tools", + "react-native-image-tool": "AgoraIO-Extensions/react-native-image-tools", "react-native-picker-select": "^8.0.4", "react-native-safe-area-context": "^4.5.0", "react-native-screens": "^3.20.0", diff --git a/example/src/examples/advanced/EncodedVideoFrame/EncodedVideoFrame.tsx b/example/src/examples/advanced/EncodedVideoFrame/EncodedVideoFrame.tsx deleted file mode 100644 index c46ff1ff4..000000000 --- a/example/src/examples/advanced/EncodedVideoFrame/EncodedVideoFrame.tsx +++ /dev/null @@ -1,237 +0,0 @@ -import { Buffer } from 'buffer'; - -import React, { ReactElement } from 'react'; -import { - ChannelProfileType, - ClientRoleType, - EncodedVideoFrameInfo, - ExternalVideoSourceType, - IRtcEngineEventHandler, - IRtcEngineEx, - IVideoEncodedFrameObserver, - RtcConnection, - VideoCodecType, - VideoFrameType, - createAgoraRtcEngine, -} from 'react-native-agora'; - -import { - BaseComponent, - BaseVideoComponentState, -} from '../../../components/BaseComponent'; -import { AgoraButton, AgoraTextInput } from '../../../components/ui'; -import Config from '../../../config/agora.config'; -import { askMediaAccess } from '../../../utils/permissions'; - -interface State extends BaseVideoComponentState { - imageBuffer: string; -} - -export default class EncodedVideoFrame - extends BaseComponent<{}, State> - implements IRtcEngineEventHandler, IVideoEncodedFrameObserver -{ - // @ts-ignore - protected engine?: IRtcEngineEx; - - protected createState(): State { - return { - appId: Config.appId, - enableVideo: true, - channelId: Config.channelId, - token: Config.token, - uid: Config.uid, - joinChannelSuccess: false, - remoteUsers: [], - startPreview: false, - imageBuffer: '', - }; - } - - /** - * Step 1: initRtcEngine - */ - protected async initRtcEngine() { - const { appId } = this.state; - if (!appId) { - this.error(`appId is invalid`); - } - - this.engine = createAgoraRtcEngine() as IRtcEngineEx; - this.engine.initialize({ - appId, - logConfig: { filePath: Config.logFilePath }, - // Should use ChannelProfileLiveBroadcasting on most of cases - channelProfile: ChannelProfileType.ChannelProfileLiveBroadcasting, - }); - this.engine.registerEventHandler(this); - - // Need granted the microphone and camera permission - await askMediaAccess([ - 'android.permission.RECORD_AUDIO', - 'android.permission.CAMERA', - ]); - - // Need to enable video on this case - // If you only call `enableAudio`, only relay the audio stream to the target channel - this.engine.enableVideo(); - - this.registerVideoEncodedFrameObserver(); - this.setExternalVideoSource(); - } - - /** - * Step 2: joinChannel - */ - protected joinChannel() { - const { channelId, token, uid } = this.state; - if (!channelId) { - this.error('channelId is invalid'); - return; - } - if (uid < 0) { - this.error('uid is invalid'); - return; - } - - // start joining channel - // 1. Users can only see each other after they join the - // same channel successfully using the same app id. - // 2. If app certificate is turned on at dashboard, token is needed - // when joining channel. The channel name and uid used to calculate - // the token has to match the ones used for channel join - this.engine?.joinChannel(token, channelId, uid, { - // Make myself as the broadcaster to send stream to remote - clientRoleType: ClientRoleType.ClientRoleBroadcaster, - publishCameraTrack: false, - publishEncodedVideoTrack: true, - }); - } - - /** - * Step 3-1: registerVideoEncodedFrameObserver - */ - registerVideoEncodedFrameObserver = () => { - this.engine?.getMediaEngine().registerVideoEncodedFrameObserver(this); - }; - - /** - * Step 3-2: setExternalVideoSource - */ - setExternalVideoSource = () => { - this.engine - ?.getMediaEngine() - .setExternalVideoSource( - true, - false, - ExternalVideoSourceType.EncodedVideoFrame, - { - codecType: VideoCodecType.VideoCodecGeneric, - } - ); - }; - - /** - * Step 3-3: pushEncodedVideoImage - */ - pushEncodedVideoImage = () => { - const { imageBuffer } = this.state; - if (!imageBuffer) { - this.error('imageBuffer is invalid'); - return; - } - - const buffer = Buffer.from(imageBuffer); - this.engine?.getMediaEngine().pushEncodedVideoImage(buffer, buffer.length, { - framesPerSecond: 60, - codecType: VideoCodecType.VideoCodecGeneric, - frameType: VideoFrameType.VideoFrameTypeKeyFrame, - }); - }; - - /** - * Step 3-4: unregisterVideoEncodedFrameObserver - */ - unregisterVideoEncodedFrameObserver = () => { - this.engine?.getMediaEngine().unregisterVideoEncodedFrameObserver(this); - }; - - /** - * Step 4: leaveChannel - */ - protected leaveChannel() { - this.engine?.leaveChannel(); - } - - /** - * Step 5: releaseRtcEngine - */ - protected releaseRtcEngine() { - this.unregisterVideoEncodedFrameObserver(); - this.engine?.unregisterEventHandler(this); - this.engine?.release(); - } - - onUserJoined(connection: RtcConnection, remoteUid: number, elapsed: number) { - super.onUserJoined(connection, remoteUid, elapsed); - // ⚠️ subscribe encoded frame only - this.engine?.setRemoteVideoSubscriptionOptions(remoteUid, { - encodedFrameOnly: true, - }); - } - - onEncodedVideoFrameReceived( - uid: number, - imageBuffer: Uint8Array, - length: number, - videoEncodedFrameInfo: EncodedVideoFrameInfo - ): boolean { - this.info( - 'OnEncodedVideoFrameReceived', - 'uid', - uid, - 'imageBuffer', - imageBuffer, - 'length', - length, - 'videoEncodedFrameInfo', - videoEncodedFrameInfo - ); - if (videoEncodedFrameInfo.codecType === VideoCodecType.VideoCodecGeneric) { - this.alert(`Receive from uid:${uid}`, `${imageBuffer.toString()}`); - } - return true; - } - - protected renderConfiguration(): ReactElement | undefined { - const { imageBuffer } = this.state; - return ( - <> - { - this.setState({ imageBuffer: text }); - }} - placeholder={`imageBuffer`} - value={imageBuffer} - /> - - ); - } - - protected override renderUser(): undefined { - return undefined; - } - - protected renderAction(): ReactElement | undefined { - const { joinChannelSuccess } = this.state; - return ( - <> - - - ); - } -} diff --git a/example/src/examples/advanced/RhythmPlayer/RhythmPlayer.tsx b/example/src/examples/advanced/RhythmPlayer/RhythmPlayer.tsx index 226ea720f..ba8c149d9 100644 --- a/example/src/examples/advanced/RhythmPlayer/RhythmPlayer.tsx +++ b/example/src/examples/advanced/RhythmPlayer/RhythmPlayer.tsx @@ -128,6 +128,7 @@ export default class RhythmPlayer beatsPerMinute, } ); + this.engine?.updateChannelMediaOptions({ publishRhythmPlayerTrack: true }); }; /** diff --git a/example/src/examples/advanced/index.ts b/example/src/examples/advanced/index.ts index a3036180e..11a5b021b 100644 --- a/example/src/examples/advanced/index.ts +++ b/example/src/examples/advanced/index.ts @@ -5,7 +5,6 @@ import BeautyEffect from './BeautyEffect/BeautyEffect'; import ChannelMediaRelay from './ChannelMediaRelay/ChannelMediaRelay'; import ContentInspect from './ContentInspect/ContentInspect'; import DirectCdnStreaming from './DirectCdnStreaming/DirectCdnStreaming'; -import EncodedVideoFrame from './EncodedVideoFrame/EncodedVideoFrame'; import Encryption from './Encryption/Encryption'; import Extension from './Extension/Extension'; import JoinMultipleChannel from './JoinMultipleChannel/JoinMultipleChannel'; @@ -60,10 +59,6 @@ const Advanced = { name: 'DirectCdnStreaming', component: DirectCdnStreaming, }, - { - name: 'EncodedVideoFrame', - component: EncodedVideoFrame, - }, { name: 'Encryption', component: Encryption, diff --git a/example/src/utils/index.ts b/example/src/utils/index.ts index 3464c9ac8..92a99dec8 100644 --- a/example/src/utils/index.ts +++ b/example/src/utils/index.ts @@ -27,12 +27,12 @@ export const arrayToItems = (array: any[]): AgoraDropdownItem[] => { }; export const enumToItems = (enumType: any): AgoraDropdownItem[] => { - const items = Object.values(enumType); - const keys = items.filter((v) => typeof v === 'string') as string[]; - const values = items.filter((v) => typeof v === 'number') as number[]; - return keys.map((value, index) => ({ - label: value, - value: values[index], + const entries = Object.entries(enumType); + const items = entries.filter(([, value]) => typeof value === 'number'); + items.sort((a: any, b: any) => a[1] - b[1]); + return items.map(([key, value]) => ({ + label: key, + value: value, })); }; diff --git a/react-native-agora.podspec b/react-native-agora.podspec index 190e0e408..0d3f9a7ec 100644 --- a/react-native-agora.podspec +++ b/react-native-agora.podspec @@ -40,8 +40,8 @@ Pod::Spec.new do |s| end end - s.dependency 'AgoraRtcEngine_iOS', '4.4.0' - s.dependency 'AgoraIrisRTC_iOS', '4.4.0-build.6' + s.dependency 'AgoraRtcEngine_iOS_Preview', '4.5.0-dev.10' + s.dependency 'AgoraIrisRTC_iOS', '4.5.0-dev.10' s.libraries = 'stdc++' s.framework = 'ReplayKit' end diff --git a/scripts/terra/config/impl_config.yaml b/scripts/terra/config/impl_config.yaml index bbb6e3d9a..8149cd791 100644 --- a/scripts/terra/config/impl_config.yaml +++ b/scripts/terra/config/impl_config.yaml @@ -2,7 +2,7 @@ parsers: - name: RTCParser package: '@agoraio-extensions/terra_shared_configs' args: - sdkVersion: 4.4.0 + sdkVersion: 4.5.0 FixEnumConstantParser: skipCalEnumValue: true diff --git a/scripts/terra/config/types_config.yaml b/scripts/terra/config/types_config.yaml index 1c6679f18..41273cd48 100644 --- a/scripts/terra/config/types_config.yaml +++ b/scripts/terra/config/types_config.yaml @@ -2,7 +2,7 @@ parsers: - name: RTCParser package: '@agoraio-extensions/terra_shared_configs' args: - sdkVersion: 4.4.0 + sdkVersion: 4.5.0 FixEnumConstantParser: skipCalEnumValue: true diff --git a/src/AgoraBase.ts b/src/AgoraBase.ts index cd6beb994..3ce168310 100644 --- a/src/AgoraBase.ts +++ b/src/AgoraBase.ts @@ -1,5 +1,6 @@ import './extension/AgoraBaseExtension'; import { + AudioSourceType, RenderModeType, VideoModulePosition, VideoSourceType, @@ -621,7 +622,7 @@ export enum QualityType { */ QualityUnsupported = 7, /** - * 8: Detecting the network quality. + * 8: The last-mile network probe test is in progress. */ QualityDetecting = 8, } @@ -770,6 +771,10 @@ export enum OrientationMode { * Video degradation preferences when the bandwidth is a constraint. */ export enum DegradationPreference { + /** + * @ignore + */ + MaintainAuto = -1, /** * 0: (Default) Prefers to reduce the video frame rate while maintaining video resolution during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where video quality is prioritized. */ @@ -1260,6 +1265,10 @@ export class EncodedVideoFrameInfo { * Compression preference for video encoding. */ export enum CompressionPreference { + /** + * @ignore + */ + PreferCompressionAuto = -1, /** * 0: Low latency preference. The SDK compresses video frames to reduce latency. This preference is suitable for scenarios where smoothness is prioritized and reduced video quality is acceptable. */ @@ -1340,6 +1349,54 @@ export enum CameraFormatType { CameraFormatBgra = 1, } +/** + * @ignore + */ +export enum VideoModuleType { + /** + * @ignore + */ + VideoModuleCapturer = 0, + /** + * @ignore + */ + VideoModuleSoftwareEncoder = 1, + /** + * @ignore + */ + VideoModuleHardwareEncoder = 2, + /** + * @ignore + */ + VideoModuleSoftwareDecoder = 3, + /** + * @ignore + */ + VideoModuleHardwareDecoder = 4, + /** + * @ignore + */ + VideoModuleRenderer = 5, +} + +/** + * @ignore + */ +export enum HdrCapability { + /** + * @ignore + */ + HdrCapabilityUnknown = -1, + /** + * @ignore + */ + HdrCapabilityUnsupported = 0, + /** + * @ignore + */ + HdrCapabilitySupported = 1, +} + /** * The bit mask of the codec type. */ @@ -2054,6 +2111,10 @@ export enum VideoApplicationScenarioType { * ApplicationScenario1v1 (2) is suitable for 1v1 video call scenarios. To meet the requirements for low latency and high-quality video in this scenario, the SDK optimizes its strategies, improving performance in terms of video quality, first frame rendering, latency on mid-to-low-end devices, and smoothness under weak network conditions. 2: 1v1 video call scenario. */ ApplicationScenario1v1 = 2, + /** + * @ignore + */ + ApplicationScenarioLiveshow = 3, } /** @@ -3223,6 +3284,46 @@ export enum VideoTranscoderError { VtErrInternal = 20, } +/** + * @ignore + */ +export class MixedAudioStream { + /** + * @ignore + */ + sourceType?: AudioSourceType; + /** + * @ignore + */ + remoteUserUid?: number; + /** + * @ignore + */ + channelId?: string; + /** + * @ignore + */ + trackId?: number; +} + +/** + * @ignore + */ +export class LocalAudioMixerConfiguration { + /** + * @ignore + */ + streamCount?: number; + /** + * @ignore + */ + audioInputStreams?: MixedAudioStream[]; + /** + * @ignore + */ + syncWithLocalMic?: boolean; +} + /** * Configurations of the last-mile network test. */ @@ -3753,6 +3854,20 @@ export class FaceShapeBeautyOptions { styleIntensity?: number; } +/** + * @ignore + */ +export class FilterEffectOptions { + /** + * @ignore + */ + path?: string; + /** + * @ignore + */ + strength?: number; +} + /** * The low-light enhancement mode. */ @@ -3821,10 +3936,6 @@ export enum VideoDenoiserLevel { * 1: Promotes reducing performance consumption during video noise reduction. prioritizes reducing performance consumption over video noise reduction quality. The performance consumption is lower, and the video noise reduction speed is faster. To avoid a noticeable shadowing effect (shadows trailing behind moving objects) in the processed video, Agora recommends that you use this settinging when the camera is fixed. */ VideoDenoiserLevelFast = 1, - /** - * 2: Enhanced video noise reduction. prioritizes video noise reduction quality over reducing performance consumption. The performance consumption is higher, the video noise reduction speed is slower, and the video noise reduction quality is better. If VideoDenoiserLevelHighQuality is not enough for your video noise reduction needs, you can use this enumerator. - */ - VideoDenoiserLevelStrength = 2, } /** @@ -3862,7 +3973,7 @@ export class ColorEnhanceOptions { */ export enum BackgroundSourceType { /** - * 0: Process the background as alpha data without replacement, only separating the portrait and the background. After setting this value, you can call startLocalVideoTranscoder to implement the picture-in-picture effect. + * @ignore */ BackgroundNone = 0, /** @@ -3977,6 +4088,10 @@ export class AudioTrackConfig { * Whether to enable the local audio-playback device: true : (Default) Enable the local audio-playback device. false : Do not enable the local audio-playback device. */ enableLocalPlayback?: boolean; + /** + * @ignore + */ + enableAudioProcessing?: boolean; } /** @@ -5242,6 +5357,20 @@ export class LocalAccessPointConfiguration { disableAut?: boolean; } +/** + * @ignore + */ +export enum RecorderStreamType { + /** + * @ignore + */ + Rtc = 0, + /** + * @ignore + */ + Preview = 1, +} + /** * @ignore */ @@ -5254,6 +5383,10 @@ export class RecorderStreamInfo { * @ignore */ uid?: number; + /** + * @ignore + */ + type?: RecorderStreamType; } /** diff --git a/src/AgoraMediaBase.ts b/src/AgoraMediaBase.ts index 3691c8e00..19f4ae410 100644 --- a/src/AgoraMediaBase.ts +++ b/src/AgoraMediaBase.ts @@ -105,6 +105,44 @@ export enum VideoSourceType { VideoSourceUnknown = 100, } +/** + * @ignore + */ +export enum AudioSourceType { + /** + * @ignore + */ + AudioSourceMicrophone = 0, + /** + * @ignore + */ + AudioSourceCustom = 1, + /** + * @ignore + */ + AudioSourceMediaPlayer = 2, + /** + * @ignore + */ + AudioSourceLoopbackRecording = 3, + /** + * @ignore + */ + AudioSourceMixedStream = 4, + /** + * @ignore + */ + AudioSourceRemoteUser = 5, + /** + * @ignore + */ + AudioSourceRemoteChannel = 6, + /** + * @ignore + */ + AudioSourceUnknown = 100, +} + /** * The type of the audio route. */ @@ -1070,7 +1108,9 @@ export class VideoFrame { */ matrix?: number[]; /** - * The alpha channel data output by using portrait segmentation algorithm. This data matches the size of the video frame, with each pixel value ranging from [0,255], where 0 represents the background and 255 represents the foreground (portrait). By setting this parameter, you can render the video background into various effects, such as transparent, solid color, image, video, etc. In custom video rendering scenarios, ensure that both the video frame and alphaBuffer are of the Full Range type; other types may cause abnormal alpha data rendering. + * The alpha channel data output by using portrait segmentation algorithm. This data matches the size of the video frame, with each pixel value ranging from [0,255], where 0 represents the background and 255 represents the foreground (portrait). By setting this parameter, you can render the video background into various effects, such as transparent, solid color, image, video, etc. + * In custom video rendering scenarios, ensure that both the video frame and alphaBuffer are of the Full Range type; other types may cause abnormal alpha data rendering. + * Make sure that alphaBuffer is exactly the same size as the video frame (width × height), otherwise it may cause the app to crash. */ alphaBuffer?: Uint8Array; /** @@ -1082,7 +1122,7 @@ export class VideoFrame { */ pixelBuffer?: Uint8Array; /** - * The meta information in the video frame. To use this parameter, please contact. + * The meta information in the video frame. To use this parameter, contact. */ metaInfo?: IVideoFrameMetaInfo; /** @@ -1137,6 +1177,20 @@ export enum VideoModulePosition { PositionPostCapturerOrigin = 1 << 3, } +/** + * @ignore + */ +export class SnapshotConfig { + /** + * @ignore + */ + filePath?: string; + /** + * @ignore + */ + position?: VideoModulePosition; +} + /** * This class is used to get raw PCM audio. * @@ -1388,7 +1442,7 @@ export interface IAudioSpectrumObserver { * * After successfully calling registerAudioSpectrumObserver to implement the onRemoteAudioSpectrum callback in the IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK will trigger the callback as the time interval you set to report the received remote audio data spectrum. * - * @param spectrums The audio spectrum information of the remote user, see UserAudioSpectrumInfo. The number of arrays is the number of remote users monitored by the SDK. If the array is null, it means that no audio spectrum of remote users is detected. + * @param spectrums The audio spectrum information of the remote user. See UserAudioSpectrumInfo. The number of arrays is the number of remote users monitored by the SDK. If the array is null, it means that no audio spectrum of remote users is detected. * @param spectrumNumber The number of remote users. */ onRemoteAudioSpectrum?( @@ -1613,6 +1667,30 @@ export class MediaRecorderConfiguration { * @ignore */ recorderInfoUpdateInterval?: number; + /** + * @ignore + */ + width?: number; + /** + * @ignore + */ + height?: number; + /** + * @ignore + */ + fps?: number; + /** + * @ignore + */ + sample_rate?: number; + /** + * @ignore + */ + channel_num?: number; + /** + * @ignore + */ + videoSourceType?: VideoSourceType; } /** diff --git a/src/IAgoraMediaEngine.ts b/src/IAgoraMediaEngine.ts index f911ce523..5de2de984 100644 --- a/src/IAgoraMediaEngine.ts +++ b/src/IAgoraMediaEngine.ts @@ -57,13 +57,7 @@ export abstract class IMediaEngine { /** * Registers a raw video frame observer object. * - * If you want to obtain the original video data of some remote users (referred to as group A) and the encoded video data of other remote users (referred to as group B), you can refer to the following steps: - * Call registerVideoFrameObserver to register the raw video frame observer before joining the channel. - * Call registerVideoEncodedFrameObserver to register the encoded video frame observer before joining the channel. - * After joining the channel, get the user IDs of group B users through onUserJoined, and then call setRemoteVideoSubscriptionOptions to set the encodedFrameOnly of this group of users to true. - * Call muteAllRemoteVideoStreams (false) to start receiving the video streams of all remote users. Then: - * The raw video data of group A users can be obtained through the callback in IVideoFrameObserver, and the SDK renders the data by default. - * The encoded video data of group B users can be obtained through the callback in IVideoEncodedFrameObserver. If you want to observe raw video frames (such as YUV or RGBA format), Agora recommends that you implement one IVideoFrameObserver class with this method. When calling this method to register a video observer, you can register callbacks in the IVideoFrameObserver class as needed. After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received. + * If you want to observe raw video frames (such as YUV or RGBA format), Agora recommends that you implement one IVideoFrameObserver class with this method. When calling this method to register a video observer, you can register callbacks in the IVideoFrameObserver class as needed. After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received. * * @param observer The observer instance. See IVideoFrameObserver. * @@ -76,14 +70,7 @@ export abstract class IMediaEngine { /** * Registers a receiver object for the encoded video image. * - * If you only want to observe encoded video frames (such as h.264 format) without decoding and rendering the video, Agora recommends that you implement one IVideoEncodedFrameObserver class through this method. If you want to obtain the original video data of some remote users (referred to as group A) and the encoded video data of other remote users (referred to as group B), you can refer to the following steps: - * Call registerVideoFrameObserver to register the raw video frame observer before joining the channel. - * Call registerVideoEncodedFrameObserver to register the encoded video frame observer before joining the channel. - * After joining the channel, get the user IDs of group B users through onUserJoined, and then call setRemoteVideoSubscriptionOptions to set the encodedFrameOnly of this group of users to true. - * Call muteAllRemoteVideoStreams (false) to start receiving the video streams of all remote users. Then: - * The raw video data of group A users can be obtained through the callback in IVideoFrameObserver, and the SDK renders the data by default. - * The encoded video data of group B users can be obtained through the callback in IVideoEncodedFrameObserver. - * Call this method before joining a channel. + * If you only want to observe encoded video frames (such as H.264 format) without decoding and rendering the video, Agora recommends that you implement one IVideoEncodedFrameObserver class through this method. Call this method before joining a channel. * * @param observer The video frame observer object. See IVideoEncodedFrameObserver. * @@ -156,6 +143,11 @@ export abstract class IMediaEngine { encodedVideoOption?: SenderOptions ): number; + /** + * @ignore + */ + abstract setExternalRemoteEglContext(eglContext: any): number; + /** * Sets the external audio source parameters. * diff --git a/src/IAgoraMediaPlayerSource.ts b/src/IAgoraMediaPlayerSource.ts index b6c437842..00530af68 100644 --- a/src/IAgoraMediaPlayerSource.ts +++ b/src/IAgoraMediaPlayerSource.ts @@ -66,8 +66,8 @@ export interface IMediaPlayerSourceObserver { * Reports the playback duration that the buffered data can support. * * When playing online media resources, the SDK triggers this callback every two seconds to report the playback duration that the currently buffered data can support. - * When the playback duration supported by the buffered data is less than the threshold (0 by default), the SDK returns PlayerEventBufferLow. - * When the playback duration supported by the buffered data is greater than the threshold (0 by default), the SDK returns PlayerEventBufferRecover. + * When the playback duration supported by the buffered data is less than the threshold (0 by default), the SDK returns PlayerEventBufferLow (6). + * When the playback duration supported by the buffered data is greater than the threshold (0 by default), the SDK returns PlayerEventBufferRecover (7). * * @param playCachedBuffer The playback duration (ms) that the buffered data can support. */ diff --git a/src/IAgoraRtcEngine.ts b/src/IAgoraRtcEngine.ts index b54142630..6d7e9968c 100644 --- a/src/IAgoraRtcEngine.ts +++ b/src/IAgoraRtcEngine.ts @@ -36,7 +36,9 @@ import { FaceShapeArea, FaceShapeAreaOptions, FaceShapeBeautyOptions, + FilterEffectOptions, FocalLengthInfo, + HdrCapability, HeadphoneEqualizerPreset, IAudioEncodedFrameObserver, LastmileProbeConfig, @@ -44,6 +46,7 @@ import { LicenseErrorType, LiveTranscoding, LocalAccessPointConfiguration, + LocalAudioMixerConfiguration, LocalAudioStats, LocalAudioStreamReason, LocalAudioStreamState, @@ -93,6 +96,7 @@ import { VideoFormat, VideoLayout, VideoMirrorModeType, + VideoModuleType, VideoOrientation, VideoQoePreferenceType, VideoRenderingTracingInfo, @@ -116,6 +120,7 @@ import { MediaSourceType, RawAudioFrameOpModeType, RenderModeType, + SnapshotConfig, VideoSourceType, } from './AgoraMediaBase'; import { IH265Transcoder } from './IAgoraH265Transcoder'; @@ -221,6 +226,10 @@ export enum AudioMixingReasonType { * 724: Successfully call stopAudioMixing to stop playing the music file. */ AudioMixingReasonStoppedByUser = 724, + /** + * @ignore + */ + AudioMixingReasonResumedByUser = 726, /** * 0: The SDK opens music file successfully. */ @@ -946,7 +955,7 @@ export class ScreenCaptureConfiguration { /** * @ignore */ - windowId?: any; + windowId?: number; /** * @ignore */ @@ -1026,7 +1035,7 @@ export class ScreenCaptureSourceInfo { /** * @ignore */ - sourceId?: any; + sourceId?: number; /** * @ignore */ @@ -1066,7 +1075,7 @@ export class ScreenCaptureSourceInfo { /** * @ignore */ - sourceDisplayId?: any; + sourceDisplayId?: number; } /** @@ -1152,7 +1161,7 @@ export class ChannelMediaOptions { */ publishCustomAudioTrack?: boolean; /** - * The ID of the custom audio source to publish. The default value is 0. If you have set sourceNumber in setExternalAudioSource to a value greater than 1, the SDK creates the corresponding number of custom audio tracks and assigns an ID to each audio track, starting from 0. + * The ID of the custom audio track to be published. The default value is 0. You can obtain the custom audio track ID through the createCustomAudioTrack method. */ publishCustomAudioTrackId?: number; /** @@ -1498,8 +1507,8 @@ export interface IRtcEngineEventHandler { * * @param connection The connection information. See RtcConnection. * @param remoteUid The user ID. The network quality of the user with this user ID is reported. If the uid is 0, the local network quality is reported. - * @param txQuality Uplink network quality rating of the user in terms of the transmission bit rate, packet loss rate, average RTT (Round-Trip Time) and jitter of the uplink network. This parameter is a quality rating helping you understand how well the current uplink network conditions can support the selected video encoder configuration. For example, a 1000 Kbps uplink network may be adequate for video frames with a resolution of 640 × 480 and a frame rate of 15 fps in the LIVE_BROADCASTING profile, but might be inadequate for resolutions higher than 1280 × 720. QualityUnknown (0): The quality is unknown. QualityExcellent (1): The quality is excellent. QualityGood (2): The network quality seems excellent, but the bitrate can be slightly lower than excellent. QualityPoor (3): Users can feel the communication is slightly impaired. QualityBad (4): Users cannot communicate smoothly. QualityVbad (5): The quality is so bad that users can barely communicate. QualityDown (6): The network is down, and users cannot communicate at all. - * @param rxQuality Downlink network quality rating of the user in terms of packet loss rate, average RTT, and jitter of the downlink network. QualityUnknown (0): The quality is unknown. QualityExcellent (1): The quality is excellent. QualityGood (2): The network quality seems excellent, but the bitrate can be slightly lower than excellent. QualityPoor (3): Users can feel the communication is slightly impaired. QualityBad (4): Users cannot communicate smoothly. QualityVbad (5): The quality is so bad that users can barely communicate. QualityDown (6): The network is down, and users cannot communicate at all. + * @param txQuality Uplink network quality rating of the user in terms of the transmission bit rate, packet loss rate, average RTT (Round-Trip Time) and jitter of the uplink network. This parameter is a quality rating helping you understand how well the current uplink network conditions can support the selected video encoder configuration. For example, a 1000 Kbps uplink network may be adequate for video frames with a resolution of 640 × 480 and a frame rate of 15 fps in the LIVE_BROADCASTING profile, but might be inadequate for resolutions higher than 1280 × 720. QualityUnknown (0): The quality is unknown. QualityExcellent (1): The quality is excellent. QualityGood (2): The network quality seems excellent, but the bitrate can be slightly lower than excellent. QualityPoor (3): Users can feel the communication is slightly impaired. QualityBad (4): Users cannot communicate smoothly. QualityVbad (5): The quality is so bad that users can barely communicate. QualityDown (6): The network is down, and users cannot communicate at all. QualityDetecting (8): The last-mile probe test is in progress. + * @param rxQuality Downlink network quality rating of the user in terms of packet loss rate, average RTT, and jitter of the downlink network. QualityUnknown (0): The quality is unknown. QualityExcellent (1): The quality is excellent. QualityGood (2): The network quality seems excellent, but the bitrate can be slightly lower than excellent. QualityPoor (3): Users can feel the communication is slightly impaired. QualityBad (4): Users cannot communicate smoothly. QualityVbad (5): The quality is so bad that users can barely communicate. QualityDown (6): The network is down, and users cannot communicate at all. QualityDetecting (8): The last-mile probe test is in progress. */ onNetworkQuality?( connection: RtcConnection, @@ -1532,7 +1541,7 @@ export interface IRtcEngineEventHandler { * * This callback reports the last-mile network conditions of the local user before the user joins the channel. Last mile refers to the connection between the local device and Agora's edge server. Before the user joins the channel, this callback is triggered by the SDK once startLastmileProbeTest is called and reports the last-mile network conditions of the local user. * - * @param quality The last-mile network quality. QualityUnknown (0): The quality is unknown. QualityExcellent (1): The quality is excellent. QualityGood (2): The network quality seems excellent, but the bitrate can be slightly lower than excellent. QualityPoor (3): Users can feel the communication is slightly impaired. QualityBad (4): Users cannot communicate smoothly. QualityVbad (5): The quality is so bad that users can barely communicate. QualityDown (6): The network is down, and users cannot communicate at all. See QualityType. + * @param quality The last-mile network quality. QualityUnknown (0): The quality is unknown. QualityExcellent (1): The quality is excellent. QualityGood (2): The network quality seems excellent, but the bitrate can be slightly lower than excellent. QualityPoor (3): Users can feel the communication is slightly impaired. QualityBad (4): Users cannot communicate smoothly. QualityVbad (5): The quality is so bad that users can barely communicate. QualityDown (6): The network is down, and users cannot communicate at all. QualityDetecting (8): The last-mile probe test is in progress. See QualityType. */ onLastmileQuality?(quality: QualityType): void; @@ -1565,7 +1574,7 @@ export interface IRtcEngineEventHandler { * @param elapsed Time elapsed (ms) from the local user calling joinChannel until this callback is triggered. */ onFirstLocalVideoFramePublished?( - source: VideoSourceType, + connection: RtcConnection, elapsed: number ): void; @@ -1963,7 +1972,7 @@ export interface IRtcEngineEventHandler { * @param connection The connection information. See RtcConnection. * @param remoteUid The ID of the remote user sending the message. * @param streamId The stream ID of the received message. - * @param code The error code. See ErrorCodeType. + * @param code Error code. See ErrorCodeType. * @param missed The number of lost messages. * @param cached Number of incoming cached messages when the data stream is interrupted. */ @@ -2956,10 +2965,10 @@ export abstract class IRtcEngine { /** * Gets the warning or error description. * - * @param code The error code or warning code reported by the SDK. + * @param code The error code reported by the SDK. * * @returns - * The specific error or warning description. + * The specific error description. */ abstract getErrorDescription(code: number): string; @@ -3367,6 +3376,15 @@ export abstract class IRtcEngine { type?: MediaSourceType ): FaceShapeAreaOptions; + /** + * @ignore + */ + abstract setFilterEffectOptions( + enabled: boolean, + options: FilterEffectOptions, + type?: MediaSourceType + ): number; + /** * Sets low-light enhancement. * @@ -3719,14 +3737,10 @@ export abstract class IRtcEngine { /** * Options for subscribing to remote video streams. * - * When a remote user has enabled dual-stream mode, you can call this method to choose the option for subscribing to the video streams sent by the remote user. - * If you only register one IVideoFrameObserver object, the SDK subscribes to the raw video data and encoded video data by default (the effect is equivalent to setting encodedFrameOnly to false). - * If you only register one IVideoEncodedFrameObserver object, the SDK only subscribes to the encoded video data by default (the effect is equivalent to setting encodedFrameOnly to true). - * If you register one IVideoFrameObserver object and one IVideoEncodedFrameObserver object successively, the SDK subscribes to the encoded video data by default (the effect is equivalent to setting encodedFrameOnly to false). - * If you call this method first with the options parameter set, and then register one IVideoFrameObserver or IVideoEncodedFrameObserver object, you need to call this method again and set the options parameter as described in the above two items to get the desired results. Agora recommends the following steps: - * Set autoSubscribeVideo to false when calling joinChannel to join a channel. - * Call this method after receiving the onUserJoined callback to set the subscription options for the specified remote user's video stream. - * Call the muteRemoteVideoStream method to resume subscribing to the video stream of the specified remote user. If you set encodedFrameOnly to true in the previous step, the SDK triggers the onEncodedVideoFrameReceived callback locally to report the received encoded video frame information. + * When a remote user has enabled dual-stream mode, you can call this method to choose the option for subscribing to the video streams sent by the remote user. The default subscription behavior of the SDK for remote video streams depends on the type of registered video observer: + * If the IVideoFrameObserver observer is registered, the default is to subscribe to both raw data and encoded data. + * If the IVideoEncodedFrameObserver observer is registered, the default is to subscribe only to the encoded data. + * If both types of observers are registered, the default behavior follows the last registered video observer. For example, if the last registered observer is the IVideoFrameObserver observer, the default is to subscribe to both raw data and encoded data. If you want to modify the default behavior, or set different subscription options for different uids, you can call this method to set it. * * @param uid The user ID of the remote user. * @param options The video subscription options. See VideoSubscriptionOptions. @@ -4008,7 +4022,7 @@ export abstract class IRtcEngine { /** * Adjusts the volume during audio mixing. * - * This method adjusts the audio mixing volume on both the local client and remote clients. + * This method adjusts the audio mixing volume on both the local client and remote clients. This method does not affect the volume of the audio file set in the playEffect method. * * @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume. * @@ -4783,6 +4797,19 @@ export abstract class IRtcEngine { mirrorMode: VideoMirrorModeType ): number; + /** + * @ignore + */ + abstract setLocalRenderTargetFps( + sourceType: VideoSourceType, + targetFps: number + ): number; + + /** + * @ignore + */ + abstract setRemoteRenderTargetFps(targetFps: number): number; + /** * Sets the local video mirror mode. * @@ -5711,7 +5738,7 @@ export abstract class IRtcEngine { * @ignore */ abstract startScreenCaptureByWindowId( - windowId: any, + windowId: number, regionRect: Rectangle, captureParams: ScreenCaptureParameters ): number; @@ -5820,6 +5847,11 @@ export abstract class IRtcEngine { size: number; }; + /** + * @ignore + */ + abstract setExternalMediaProjection(mediaProjection: any): number; + /** * Sets the screen sharing scenario. * @@ -5991,6 +6023,23 @@ export abstract class IRtcEngine { */ abstract stopLocalVideoTranscoder(): number; + /** + * @ignore + */ + abstract startLocalAudioMixer(config: LocalAudioMixerConfiguration): number; + + /** + * @ignore + */ + abstract updateLocalAudioMixerConfiguration( + config: LocalAudioMixerConfiguration + ): number; + + /** + * @ignore + */ + abstract stopLocalAudioMixer(): number; + /** * Starts camera capture. * @@ -6123,9 +6172,8 @@ export abstract class IRtcEngine { * Sends data stream messages. * * After calling createDataStream, you can call this method to send data stream messages to all users in the channel. The SDK has the following restrictions on this method: - * Each user can have up to five data streams simultaneously. - * Up to 60 packets can be sent per second in a data stream with each packet having a maximum size of 1 KB. - * Up to 30 KB of data can be sent per second in a data stream. A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message. A failed method call triggers the onStreamMessageError callback on the remote client. + * Each client within the channel can have up to 5 data channels simultaneously, with a total shared packet bitrate limit of 30 KB/s for all data channels. + * Each data channel can send up to 60 packets per second, with each packet being a maximum of 1 KB. A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message. A failed method call triggers the onStreamMessageError callback on the remote client. * This method needs to be called after createDataStream and joining the channel. * In live streaming scenarios, this method only applies to hosts. * @@ -6611,7 +6659,7 @@ export abstract class IRtcEngine { * When video screenshot and upload function is enabled, the SDK takes screenshots and uploads videos sent by local users based on the type and frequency of the module you set in ContentInspectConfig. After video screenshot and upload, the Agora server sends the callback notification to your app server in HTTPS requests and sends all screenshots to the third-party cloud storage service. * * @param enabled Whether to enalbe video screenshot and upload: true : Enables video screenshot and upload. false : Disables video screenshot and upload. - * @param config Screenshot and upload configuration. See ContentInspectConfig. When the video moderation module is set to video moderation via Agora self-developed extension(ContentInspectSupervision), the video screenshot and upload dynamic library libagora_content_inspect_extension.dll is required. Deleting this library disables the screenshot and upload feature. + * @param config Screenshot and upload configuration. See ContentInspectConfig. * * @returns * 0: Success. @@ -6660,7 +6708,7 @@ export abstract class IRtcEngine { * Sets up cloud proxy service. * * When users' network access is restricted by a firewall, configure the firewall to allow specific IP addresses and ports provided by Agora; then, call this method to enable the cloud proxyType and set the cloud proxy type with the proxyType parameter. After successfully connecting to the cloud proxy, the SDK triggers the onConnectionStateChanged (ConnectionStateConnecting, ConnectionChangedSettingProxyServer) callback. To disable the cloud proxy that has been set, call the setCloudProxy (NoneProxy). To change the cloud proxy type that has been set, call the setCloudProxy (NoneProxy) first, and then call the setCloudProxy to set the proxyType you want. - * Agora recommends that you call this method after joining a channel. + * Agora recommends that you call this method before joining a channel. * When a user is behind a firewall and uses the Force UDP cloud proxy, the services for Media Push and cohosting across channels are not available. * When you use the Force TCP cloud proxy, note that an error would occur when calling the startAudioMixing method to play online music files in the HTTP protocol. The services for Media Push and cohosting across channels use the cloud proxy with the TCP protocol. * @@ -6816,6 +6864,11 @@ export abstract class IRtcEngine { */ abstract sendAudioMetadata(metadata: string, length: number): number; + /** + * @ignore + */ + abstract queryHDRCapability(videoModule: VideoModuleType): HdrCapability; + /** * @ignore */ @@ -6966,6 +7019,11 @@ export abstract class IRtcEngine { * The native handle of the SDK. */ abstract getNativeHandle(): number; + + /** + * @ignore + */ + abstract takeSnapshotWithConfig(uid: number, config: SnapshotConfig): number; } /** @@ -6998,6 +7056,10 @@ export enum MediaDeviceStateType { * 2: The device is disabled. */ MediaDeviceStateDisabled = 2, + /** + * @ignore + */ + MediaDeviceStatePluggedIn = 3, /** * 4: The device is not found. */ diff --git a/src/IAgoraRtcEngineEx.ts b/src/IAgoraRtcEngineEx.ts index efabe8f77..cf410a4ea 100644 --- a/src/IAgoraRtcEngineEx.ts +++ b/src/IAgoraRtcEngineEx.ts @@ -17,7 +17,11 @@ import { VideoSubscriptionOptions, WatermarkOptions, } from './AgoraBase'; -import { ContentInspectConfig, RenderModeType } from './AgoraMediaBase'; +import { + ContentInspectConfig, + RenderModeType, + SnapshotConfig, +} from './AgoraMediaBase'; import { ChannelMediaOptions, IRtcEngine, @@ -93,6 +97,15 @@ export abstract class IRtcEngineEx extends IRtcEngine { options?: LeaveChannelOptions ): number; + /** + * @ignore + */ + abstract leaveChannelWithUserAccountEx( + channelId: string, + userAccount: string, + options?: LeaveChannelOptions + ): number; + /** * Updates the channel media options after joining the channel. * @@ -531,9 +544,8 @@ export abstract class IRtcEngineEx extends IRtcEngine { * Sends data stream messages. * * A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message. A failed method call triggers the onStreamMessageError callback on the remote client. The SDK has the following restrictions on this method: - * Each user can have up to five data streams simultaneously. - * Up to 60 packets can be sent per second in a data stream with each packet having a maximum size of 1 KB. - * Up to 30 KB of data can be sent per second in a data stream. After calling createDataStreamEx, you can call this method to send data stream messages to all users in the channel. + * Each client within the channel can have up to 5 data channels simultaneously, with a total shared packet bitrate limit of 30 KB/s for all data channels. + * Each data channel can send up to 60 packets per second, with each packet being a maximum of 1 KB. After calling createDataStreamEx, you can call this method to send data stream messages to all users in the channel. * Call this method after joinChannelEx. * Ensure that you call createDataStreamEx to create a data channel before calling this method. * This method applies only to the COMMUNICATION profile or to the hosts in the LIVE_BROADCASTING profile. If an audience in the LIVE_BROADCASTING profile calls this method, the audience may be switched to a host. @@ -878,7 +890,7 @@ export abstract class IRtcEngineEx extends IRtcEngine { * This method can take screenshots for multiple video streams and upload them. When video screenshot and upload function is enabled, the SDK takes screenshots and uploads videos sent by local users based on the type and frequency of the module you set in ContentInspectConfig. After video screenshot and upload, the Agora server sends the callback notification to your app server in HTTPS requests and sends all screenshots to the third-party cloud storage service. * * @param enabled Whether to enalbe video screenshot and upload: true : Enables video screenshot and upload. false : Disables video screenshot and upload. - * @param config Screenshot and upload configuration. See ContentInspectConfig. When the video moderation module is set to video moderation via Agora self-developed extension(ContentInspectSupervision), the video screenshot and upload dynamic library libagora_content_inspect_extension.dll is required. Deleting this library disables the screenshot and upload feature. + * @param config Screenshot and upload configuration. See ContentInspectConfig. * @param connection The connection information. See RtcConnection. * * @returns @@ -916,7 +928,7 @@ export abstract class IRtcEngineEx extends IRtcEngine { /** * Gets the call ID with the connection ID. * - * When a user joins a channel on a client, a callId is generated to identify the call from the client. You can call this method to get the callId parameter, and pass it in when calling methods such as rate and complain. + * When a user joins a channel on a client, a callId is generated to identify the call from the client. You can call this method to get callId, and pass it in when calling methods such as rate and complain. * * @param connection The connection information. See RtcConnection. * @@ -934,4 +946,13 @@ export abstract class IRtcEngineEx extends IRtcEngine { metadata: string, length: number ): number; + + /** + * @ignore + */ + abstract takeSnapshotWithConfigEx( + connection: RtcConnection, + uid: number, + config: SnapshotConfig + ): number; } diff --git a/src/impl/IAgoraMediaEngineImpl.ts b/src/impl/IAgoraMediaEngineImpl.ts index ddc9e7a5c..4598eded7 100644 --- a/src/impl/IAgoraMediaEngineImpl.ts +++ b/src/impl/IAgoraMediaEngineImpl.ts @@ -172,6 +172,24 @@ export class IMediaEngineImpl implements IMediaEngine { return 'MediaEngine_setExternalVideoSource_fff99b6'; } + setExternalRemoteEglContext(eglContext: any): number { + const apiType = this.getApiTypeFromSetExternalRemoteEglContext(eglContext); + const jsonParams = { + eglContext: eglContext, + toJSON: () => { + return { + eglContext: eglContext, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromSetExternalRemoteEglContext(eglContext: any): string { + return 'MediaEngine_setExternalRemoteEglContext_f337cbf'; + } + setExternalAudioSource( enabled: boolean, sampleRate: number, diff --git a/src/impl/IAgoraRtcEngineExImpl.ts b/src/impl/IAgoraRtcEngineExImpl.ts index d3fdc02ca..f454f6d2a 100644 --- a/src/impl/IAgoraRtcEngineExImpl.ts +++ b/src/impl/IAgoraRtcEngineExImpl.ts @@ -16,7 +16,11 @@ import { VideoSubscriptionOptions, WatermarkOptions, } from '../AgoraBase'; -import { ContentInspectConfig, RenderModeType } from '../AgoraMediaBase'; +import { + ContentInspectConfig, + RenderModeType, + SnapshotConfig, +} from '../AgoraMediaBase'; import { ChannelMediaOptions, LeaveChannelOptions, @@ -88,6 +92,40 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx { return 'RtcEngineEx_leaveChannelEx_b03ee9a'; } + leaveChannelWithUserAccountEx( + channelId: string, + userAccount: string, + options?: LeaveChannelOptions + ): number { + const apiType = this.getApiTypeFromLeaveChannelWithUserAccountEx( + channelId, + userAccount, + options + ); + const jsonParams = { + channelId: channelId, + userAccount: userAccount, + options: options, + toJSON: () => { + return { + channelId: channelId, + userAccount: userAccount, + options: options, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromLeaveChannelWithUserAccountEx( + channelId: string, + userAccount: string, + options?: LeaveChannelOptions + ): string { + return 'RtcEngineEx_leaveChannelWithUserAccountEx_8bbe372'; + } + updateChannelMediaOptionsEx( options: ChannelMediaOptions, connection: RtcConnection @@ -1595,6 +1633,40 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx { ): string { return 'RtcEngineEx_sendAudioMetadataEx_e2bf1c4'; } + + takeSnapshotWithConfigEx( + connection: RtcConnection, + uid: number, + config: SnapshotConfig + ): number { + const apiType = this.getApiTypeFromTakeSnapshotWithConfigEx( + connection, + uid, + config + ); + const jsonParams = { + connection: connection, + uid: uid, + config: config, + toJSON: () => { + return { + connection: connection, + uid: uid, + config: config, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromTakeSnapshotWithConfigEx( + connection: RtcConnection, + uid: number, + config: SnapshotConfig + ): string { + return 'RtcEngineEx_takeSnapshotEx_b856417'; + } } import { callIrisApi } from '../internal/IrisApiEngine'; diff --git a/src/impl/IAgoraRtcEngineImpl.ts b/src/impl/IAgoraRtcEngineImpl.ts index 43c3736a6..df0f15a26 100644 --- a/src/impl/IAgoraRtcEngineImpl.ts +++ b/src/impl/IAgoraRtcEngineImpl.ts @@ -23,12 +23,15 @@ import { FaceShapeArea, FaceShapeAreaOptions, FaceShapeBeautyOptions, + FilterEffectOptions, FocalLengthInfo, + HdrCapability, HeadphoneEqualizerPreset, IAudioEncodedFrameObserver, LastmileProbeConfig, LiveTranscoding, LocalAccessPointConfiguration, + LocalAudioMixerConfiguration, LocalTranscoderConfiguration, LowlightEnhanceOptions, RecorderStreamInfo, @@ -50,6 +53,7 @@ import { VideoEncoderConfiguration, VideoFormat, VideoMirrorModeType, + VideoModuleType, VideoOrientation, VideoQoePreferenceType, VideoStreamType, @@ -66,6 +70,7 @@ import { MediaSourceType, RawAudioFrameOpModeType, RenderModeType, + SnapshotConfig, VideoSourceType, } from '../AgoraMediaBase'; import { IH265Transcoder } from '../IAgoraH265Transcoder'; @@ -272,7 +277,7 @@ export function processIRtcEngineEventHandler( case 'onFirstLocalVideoFramePublished': if (handler.onFirstLocalVideoFramePublished !== undefined) { handler.onFirstLocalVideoFramePublished( - jsonParams.source, + jsonParams.connection, jsonParams.elapsed ); } @@ -1732,6 +1737,40 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_getFaceShapeAreaOptions_0783e2c'; } + setFilterEffectOptions( + enabled: boolean, + options: FilterEffectOptions, + type: MediaSourceType = MediaSourceType.PrimaryCameraSource + ): number { + const apiType = this.getApiTypeFromSetFilterEffectOptions( + enabled, + options, + type + ); + const jsonParams = { + enabled: enabled, + options: options, + type: type, + toJSON: () => { + return { + enabled: enabled, + options: options, + type: type, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromSetFilterEffectOptions( + enabled: boolean, + options: FilterEffectOptions, + type: MediaSourceType = MediaSourceType.PrimaryCameraSource + ): string { + return 'RtcEngine_setFilterEffectOptions_53b4be3'; + } + setLowlightEnhanceOptions( enabled: boolean, options: LowlightEnhanceOptions, @@ -3749,6 +3788,53 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_setRemoteRenderMode_6771ce0'; } + setLocalRenderTargetFps( + sourceType: VideoSourceType, + targetFps: number + ): number { + const apiType = this.getApiTypeFromSetLocalRenderTargetFps( + sourceType, + targetFps + ); + const jsonParams = { + sourceType: sourceType, + targetFps: targetFps, + toJSON: () => { + return { + sourceType: sourceType, + targetFps: targetFps, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromSetLocalRenderTargetFps( + sourceType: VideoSourceType, + targetFps: number + ): string { + return 'RtcEngine_setLocalRenderTargetFps_2ad83d8'; + } + + setRemoteRenderTargetFps(targetFps: number): number { + const apiType = this.getApiTypeFromSetRemoteRenderTargetFps(targetFps); + const jsonParams = { + targetFps: targetFps, + toJSON: () => { + return { + targetFps: targetFps, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromSetRemoteRenderTargetFps(targetFps: number): string { + return 'RtcEngine_setRemoteRenderTargetFps_46f8ab7'; + } + setLocalVideoMirrorMode(mirrorMode: VideoMirrorModeType): number { const apiType = this.getApiTypeFromSetLocalVideoMirrorMode(mirrorMode); const jsonParams = { @@ -5177,7 +5263,7 @@ export class IRtcEngineImpl implements IRtcEngine { regionRect: Rectangle, captureParams: ScreenCaptureParameters ): string { - return 'RtcEngine_startScreenCaptureByDisplayId_7cf6800'; + return 'RtcEngine_startScreenCaptureByDisplayId_ce89867'; } startScreenCaptureByScreenRect( @@ -5227,7 +5313,7 @@ export class IRtcEngineImpl implements IRtcEngine { } startScreenCaptureByWindowId( - windowId: any, + windowId: number, regionRect: Rectangle, captureParams: ScreenCaptureParameters ): number { @@ -5253,11 +5339,11 @@ export class IRtcEngineImpl implements IRtcEngine { } protected getApiTypeFromStartScreenCaptureByWindowId( - windowId: any, + windowId: number, regionRect: Rectangle, captureParams: ScreenCaptureParameters ): string { - return 'RtcEngine_startScreenCaptureByWindowId_5ab7e59'; + return 'RtcEngine_startScreenCaptureByWindowId_ce89867'; } setScreenCaptureContentHint(contentHint: VideoContentHint): number { @@ -5393,6 +5479,27 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_queryCameraFocalLengthCapability_2dee6af'; } + setExternalMediaProjection(mediaProjection: any): number { + const apiType = + this.getApiTypeFromSetExternalMediaProjection(mediaProjection); + const jsonParams = { + mediaProjection: mediaProjection, + toJSON: () => { + return { + mediaProjection: mediaProjection, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromSetExternalMediaProjection( + mediaProjection: any + ): string { + return 'RtcEngine_setExternalMediaProjection_f337cbf'; + } + setScreenCaptureScenario(screenScenario: ScreenScenarioType): number { const apiType = this.getApiTypeFromSetScreenCaptureScenario(screenScenario); const jsonParams = { @@ -5626,6 +5733,60 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_stopLocalVideoTranscoder'; } + startLocalAudioMixer(config: LocalAudioMixerConfiguration): number { + const apiType = this.getApiTypeFromStartLocalAudioMixer(config); + const jsonParams = { + config: config, + toJSON: () => { + return { + config: config, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromStartLocalAudioMixer( + config: LocalAudioMixerConfiguration + ): string { + return 'RtcEngine_startLocalAudioMixer_a7ff78e'; + } + + updateLocalAudioMixerConfiguration( + config: LocalAudioMixerConfiguration + ): number { + const apiType = + this.getApiTypeFromUpdateLocalAudioMixerConfiguration(config); + const jsonParams = { + config: config, + toJSON: () => { + return { + config: config, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromUpdateLocalAudioMixerConfiguration( + config: LocalAudioMixerConfiguration + ): string { + return 'RtcEngine_updateLocalAudioMixerConfiguration_a7ff78e'; + } + + stopLocalAudioMixer(): number { + const apiType = this.getApiTypeFromStopLocalAudioMixer(); + const jsonParams = {}; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromStopLocalAudioMixer(): string { + return 'RtcEngine_stopLocalAudioMixer'; + } + startCameraCapture( sourceType: VideoSourceType, config: CameraCapturerConfiguration @@ -6876,6 +7037,27 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_sendAudioMetadata_878f309'; } + queryHDRCapability(videoModule: VideoModuleType): HdrCapability { + const apiType = this.getApiTypeFromQueryHDRCapability(videoModule); + const jsonParams = { + videoModule: videoModule, + toJSON: () => { + return { + videoModule: videoModule, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + const capability = jsonResults.capability; + return capability; + } + + protected getApiTypeFromQueryHDRCapability( + videoModule: VideoModuleType + ): string { + return 'RtcEngine_queryHDRCapability_bebdacb'; + } + startScreenCaptureBySourceType( sourceType: VideoSourceType, config: ScreenCaptureConfiguration @@ -7142,6 +7324,29 @@ export class IRtcEngineImpl implements IRtcEngine { protected getApiTypeFromGetNativeHandle(): string { return 'RtcEngine_getNativeHandle'; } + + takeSnapshotWithConfig(uid: number, config: SnapshotConfig): number { + const apiType = this.getApiTypeFromTakeSnapshotWithConfig(uid, config); + const jsonParams = { + uid: uid, + config: config, + toJSON: () => { + return { + uid: uid, + config: config, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromTakeSnapshotWithConfig( + uid: number, + config: SnapshotConfig + ): string { + return 'RtcEngine_takeSnapshot_5669ea6'; + } } import { callIrisApi } from '../internal/IrisApiEngine'; diff --git a/src/ti/IAgoraRtcEngine-ti.ts b/src/ti/IAgoraRtcEngine-ti.ts index 144cfd88e..79084cc5d 100644 --- a/src/ti/IAgoraRtcEngine-ti.ts +++ b/src/ti/IAgoraRtcEngine-ti.ts @@ -25,7 +25,7 @@ export const IRtcEngineEventHandler = t.iface([], { "onDownlinkNetworkInfoUpdated": t.opt(t.func("void", t.param("info", "DownlinkNetworkInfo"))), "onLastmileQuality": t.opt(t.func("void", t.param("quality", "QualityType"))), "onFirstLocalVideoFrame": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("width", "number"), t.param("height", "number"), t.param("elapsed", "number"))), - "onFirstLocalVideoFramePublished": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("elapsed", "number"))), + "onFirstLocalVideoFramePublished": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("elapsed", "number"))), "onFirstRemoteVideoDecoded": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("width", "number"), t.param("height", "number"), t.param("elapsed", "number"))), "onVideoSizeChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("sourceType", "VideoSourceType"), t.param("uid", "number"), t.param("width", "number"), t.param("height", "number"), t.param("rotation", "number"))), "onLocalVideoStateChanged": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("state", "LocalVideoStreamState"), t.param("reason", "LocalVideoStreamReason"))), diff --git a/yarn.lock b/yarn.lock index 2cb34bc64..e36b3137b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13919,7 +13919,7 @@ __metadata: react-native-color-picker: ^0.6.0 react-native-fs: ^2.20.0 react-native-gesture-handler: ^2.9.0 - react-native-image-tool: "github:LichKing-2234/react-native-image-tools" + react-native-image-tool: AgoraIO-Extensions/react-native-image-tools react-native-picker-select: ^8.0.4 react-native-safe-area-context: ^4.5.0 react-native-screens: ^3.20.0 @@ -14067,13 +14067,13 @@ __metadata: languageName: node linkType: hard -"react-native-image-tool@github:LichKing-2234/react-native-image-tools": +react-native-image-tool@AgoraIO-Extensions/react-native-image-tools: version: 0.8.1 - resolution: "react-native-image-tool@https://github.com/LichKing-2234/react-native-image-tools.git#commit=6ac74db10da838f1e529c364dfe2fb92293a12f7" + resolution: "react-native-image-tool@https://github.com/AgoraIO-Extensions/react-native-image-tools.git#commit=7ffc05ec3a6976b605c307942986a289ab4f47ef" peerDependencies: react: "*" react-native: "*" - checksum: fcb7944526ba2e095624c15e88d53a220e7665de49eb19cb554abfa17df13310f44513952c9a9aeb48007f2afbe3f6b2adc99fa489919dadd583614514476bf9 + checksum: 1a6eb6e3c9b09c092a3c0a6408d04ebbecc350bee4eda4b2c8f1ed2d50d2b0fe9f12b8f912540cda333e7ae9a7bf6d6e3fb0d7f840a1d741938314290c463e74 languageName: node linkType: hard