Skip to content

Commit

Permalink
Merge branch 'dev/4.5.0' of ssh://github.com/AgoraIO-Extensions/react…
Browse files Browse the repository at this point in the history
…-native-agora into dev/4.5.0
  • Loading branch information
guoxianzhe committed Oct 31, 2024
2 parents b8aed80 + 41e3d9c commit ffb4d30
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 68 deletions.
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
api 'io.agora.rtc:agora-full-preview:4.5.0-dev.6'
implementation 'io.agora.rtc:full-screen-sharing-special:4.5.0-dev.6'
implementation 'io.agora.rtc:iris-rtc:4.5.0-dev.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()) {
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ target 'AgoraRtcNgExample' do
end

target 'ScreenShare' do
pod 'AgoraRtcEngine_iOS_Preview', '4.5.0-dev.6'
pod 'AgoraRtcEngine_iOS_Preview', '4.5.0-dev.10'
end
10 changes: 5 additions & 5 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- AgoraIrisRTC_iOS (4.5.0-dev.6)
- AgoraRtcEngine_iOS_Preview (4.5.0-dev.6)
- 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)
Expand Down Expand Up @@ -378,8 +378,8 @@ PODS:
- React-logger (0.72.12):
- glog
- react-native-agora (4.4.0):
- AgoraIrisRTC_iOS (= 4.5.0-dev.6)
- AgoraRtcEngine_iOS_Preview (= 4.5.0-dev.6)
- 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):
Expand Down Expand Up @@ -517,7 +517,7 @@ PODS:
- Yoga (~> 1.14)

DEPENDENCIES:
- AgoraRtcEngine_iOS_Preview (= 4.5.0-dev.6)
- 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`)
Expand Down
4 changes: 2 additions & 2 deletions react-native-agora.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Pod::Spec.new do |s|
end
end

s.dependency 'AgoraRtcEngine_iOS_Preview', '4.5.0-dev.6'
s.dependency 'AgoraIrisRTC_iOS', '4.5.0-dev.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
12 changes: 8 additions & 4 deletions src/AgoraBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,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,
}
Expand Down Expand Up @@ -3299,7 +3299,7 @@ export class MixedAudioStream {
/**
* @ignore
*/
channelName?: string;
channelId?: string;
/**
* @ignore
*/
Expand All @@ -3317,7 +3317,7 @@ export class LocalAudioMixerConfiguration {
/**
* @ignore
*/
sourceStreams?: MixedAudioStream[];
audioInputStreams?: MixedAudioStream[];
/**
* @ignore
*/
Expand Down Expand Up @@ -3973,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,
/**
Expand Down Expand Up @@ -4088,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;
}

/**
Expand Down
8 changes: 5 additions & 3 deletions src/AgoraMediaBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1108,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;
/**
Expand All @@ -1120,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;
/**
Expand Down Expand Up @@ -1440,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?(
Expand Down
17 changes: 2 additions & 15 deletions src/IAgoraMediaEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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.
*
Expand Down
4 changes: 2 additions & 2 deletions src/IAgoraMediaPlayerSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Loading

0 comments on commit ffb4d30

Please sign in to comment.