Skip to content

Commit

Permalink
Merge pull request #3517 from AgoraIO/release/rtc-ng/4.3
Browse files Browse the repository at this point in the history
Release/rtc ng/4.3
  • Loading branch information
Cilla-luodan authored Jan 25, 2024
2 parents 9027d41 + 4a5aefe commit be28a30
Show file tree
Hide file tree
Showing 13 changed files with 1,858 additions and 20 deletions.
7 changes: 7 additions & 0 deletions dita/RTC-NG/config/keys-rtc-ng-api-electron.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -10819,6 +10819,13 @@
</keywords>
</topicmeta>
</keydef>
<keydef keys="VIDEO_CODEC_NONE">
<topicmeta>
<keywords>
<keyword>VideoCodecNone</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="VIDEO_CODEC_VP8">
<topicmeta>
<keywords>
Expand Down
7 changes: 7 additions & 0 deletions dita/RTC-NG/config/keys-rtc-ng-api-rn.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -10776,6 +10776,13 @@
</keywords>
</topicmeta>
</keydef>
<keydef keys="VIDEO_CODEC_NONE">
<topicmeta>
<keywords>
<keyword>VideoCodecNone</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="VIDEO_CODEC_VP8">
<topicmeta>
<keywords>
Expand Down
2 changes: 1 addition & 1 deletion dita/RTC-NG/config/relations-rtc-ng-api.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -2651,7 +2651,7 @@
<topicref keyref="onLocalVideoStateChanged"/>
<topicref keyref="onLocalVideoStats"/>
<topicref keyref="onLocalVideoTranscoderError"/>
<topicref keyref="onTranscodedStreamLayoutInfo"/>
<topicref keyref="onTranscodedStreamLayoutInfo" props="native unity rn flutter cs unreal bp"/>
<topicref keyref="onMicrophoneEnabled" props="hide"/>
<topicref keyref="onNetworkQuality"/>
<topicref keyref="onNetworkTypeChanged"/>
Expand Down
7 changes: 7 additions & 0 deletions en-US/dita/RTC-NG/config/keys-rtc-ng-api-electron.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -10819,6 +10819,13 @@
</keywords>
</topicmeta>
</keydef>
<keydef keys="VIDEO_CODEC_NONE">
<topicmeta>
<keywords>
<keyword>VideoCodecNone</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="VIDEO_CODEC_VP8">
<topicmeta>
<keywords>
Expand Down
7 changes: 7 additions & 0 deletions en-US/dita/RTC-NG/config/keys-rtc-ng-api-rn.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -10776,6 +10776,13 @@
</keywords>
</topicmeta>
</keydef>
<keydef keys="VIDEO_CODEC_NONE">
<topicmeta>
<keywords>
<keyword>VideoCodecNone</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="VIDEO_CODEC_VP8">
<topicmeta>
<keywords>
Expand Down
211 changes: 211 additions & 0 deletions markdown/RTC 4.x/release-notes/en-US/framework/release_electron_ng.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,214 @@
## v4.3.0

v4.3.0 was released on xx xx, 2024.

#### Compatibility changes

This release has optimized the implementation of some functions, involving renaming or deletion of some APIs. To ensure the normal operation of the project, you need to update the code in the app after upgrading to this release.

1. **Renaming parameters in callbacks**

In order to make the parameters in some callbacks and the naming of enumerations in enumeration classes easier to understand, the following modifications have been made in this release. Please modify the parameter settings in the callbacks after upgrading to this release.

| Callback | Original parameter name | Existing parameter name |
| ---------------------------------- | ----------------------- | ----------------------- |
| `onLocalAudioStateChanged` | `error` | `reason` |
| `onLocalVideoStateChanged` | `error` | `reason` |
| `onDirectCdnStreamingStateChanged` | `error` | `reason` |
| `onRtmpStreamingStateChanged` | `errCode` | `reason` |

| Original enumeration class | Current enumeration class |
| ---------------------------- | -------------------------- |
| `LocalAudioStreamError` | `LocalAudioStreamReason` |
| `LocalVideoStreamError` | `LocalVideoStreamReason` |
| `DirectCdnStreamingError` | `DirectCdnStreamingReason` |
| `MediaPlayerError` | `MediaPlayerReason` |
| `RtmpStreamPublishErrorType` | `RtmpStreamPublishReason` |

**Note:** For specific renaming of enumerations, please refer to [API changes](Chunk2067875538.html#apichange).

2. **Channel media relay**

To improve interface usability, this release removes some methods and callbacks for channel media relay. Use the alternative options listed in the table below:

| Deleted methods and callbacks | Alternative methods and callbacks |
| ----------------------------------------------------- | ---------------------------------- |
| `startChannelMediaRelay``updateChannelMediaRelay` | `startOrUpdateChannelMediaRelay` |
| `startChannelMediaRelayEx``updateChannelMediaRelayEx` | `startOrUpdateChannelMediaRelayEx` |
| `onChannelMediaRelayEvent` | `onChannelMediaRelayStateChanged` |

3. **Reasons for local video state changes**

This release makes the following modifications to the enumerations in the [LocalVideoStreamReason](API/enum_localvideostreamreason.html) class:

- The value of `LocalVideoStreamReasonScreenCapturePaused` (formerly `LocalVideoStreamReasonScreenCapturePaused`) has been changed from 23 to 28.
- The value of `LocalVideoStreamReasonScreenCaptureResumed` (formerly `LocalVideoStreamReasonScreenCaptureResumed`) has been changed from 24 to 29.
- The `LocalVideoStreamReasonCodecNotSupport` enumeration has been changed to `LocalVideoStreamReasonCodecNotSupport`.

4. **Audio loopback capturing**

- Before v4.3.0, if you call the [disableAudio](API/api_irtcengine_disableaudio.html) method to disable the audio module, audio loopback capturing will not be disabled.
- As of v4.3.0, if you call the [disableAudio](API/api_irtcengine_disableaudio.html) method to disable the audio module, audio loopback capturing will be disabled as well. If you need to enable audio loopback capturing, you need to enable the audio module by calling the [enableAudio](API/api_irtcengine_enableaudio.html) method and then call [enableLoopbackRecording](API/api_irtcengine_enableloopbackrecording.html).

#### New features

1. **Local preview with multiple views**

This release supports local preview with simultaneous display of multiple frames, where the videos shown in the frames are positioned at different observation positions along the video link. Examples of usage are as follows:

1. Call [setupLocalVideo](API/api_irtcengine_setuplocalvideo.html) to set the first view: Set the `position` parameter to `PositionPostCapturerOrigin` (introduced in this release) in `VideoCanvas`. This corresponds to the position after local video capture and before preprocessing. The video observed here does not have preprocessing effects.
2. Call [setupLocalVideo](API/api_irtcengine_setuplocalvideo.html) to set the second view: Set the `position` parameter to `PositionPostCapturer` in `VideoCanvas`, the video observed here has the effect of video preprocessing.
3. Observe the local preview effect: The first view is the original video of a real person; the second view is the virtual portrait after video preprocessing (including image enhancement, virtual background, and local preview of watermarks) effects.

2. **Query Device Score**

This release adds the [queryDeviceScore](API/api_irtcengine_querydevicescore.html) method to query the device's score level to ensure that the user-set parameters do not exceed the device's capabilities. For example, in HD or UHD video scenarios, you can first call this method to query the device's score. If the returned score is low (for example, below 60), you need to lower the video resolution to avoid affecting the video experience. The minimum device score required for different business scenarios is varied. For specific score recommendations, please contact [technical support](mailto:[email protected]).

3. **Select different audio tracks for local playback and streaming**

This release introduces the [selectMultiAudioTrack](API/api_imediaplayer_selectmultiaudiotrack.html) method that allows you to select different audio tracks for local playback and streaming to remote users. For example, in scenarios like online karaoke, the host can choose to play the original sound locally and publish the accompaniment in the channel. Before using this function, you need to open the media file through the [openWithMediaSource](API/api_imediaplayer_openwithmediasource.html) method and enable this function by setting the `enableMultiAudioTrack` parameter in [MediaSource](API/class_mediasource.html).

4. **Others**

This release has passed the test verification of the following APIs and can be applied to the entire series of RTC 4.x SDK.

- [setRemoteSubscribeFallbackOption](API/api_irtcengine_setremotesubscribefallbackoption.html): Sets fallback option for the subscribed video stream in weak network conditions.
- [onRemoteSubscribeFallbackToAudioOnly](API/callback_irtcengineeventhandler_onremotesubscribefallbacktoaudioonly.html): Occurs when the subscribed video stream falls back to audio-only stream due to weak network conditions or switches back to the video stream after the network conditions improve.
- [setPlaybackDeviceVolume](API/api_iaudiodevicemanager_setplaybackdevicevolume.html)(Windows): Sets the volume of the audio playback device.
- [getRecordingDeviceVolume](API/api_iaudiodevicemanager_getrecordingdevicevolume.html)(Windows): Sets the volume of the audio capturing device.
- [setPlayerOptionInInt](API/api_imediaplayer_setplayeroption.html) and [setPlayerOptionInString](API/api_imediaplayer_setplayeroption2.html): Sets media player options for providing technical previews or special customization features.
- [enableCustomAudioLocalPlayback](API/api_irtcengine_enablecustomaudiolocalplayback.html): Sets whether to enable the local playback of external audio source.

#### Improvements

1. **SDK task processing scheduling optimization**

This release optimizes the scheduling mechanism for internal tasks within the SDK, with improvements in the following aspects:

- The speed of video rendering and audio playback for both remote and local first frames improves by 10% to 20%.
- The API call duration and response time are reduced by 5% to 50%.
- The SDK's parallel processing capability significantly improves, delivering higher video quality (720P, 24 fps) even on lower-end devices. Additionally, image processing remains more stable in scenarios involving high resolutions and frame rates.
- The stability of the SDK is further enhanced, leading to a noticeable decrease in the crash rate across various specific scenarios.

2. **In-ear monitoring volume boost**

This release provides users with more flexible in-ear monitoring audio adjustment options, supporting the ability to set the in-ear monitoring volume to four times the original volume by calling [setInEarMonitoringVolume](API/api_irtcengine_setinearmonitoringvolume.html).

3. **Dual-stream mode optimization**

This release optimizes the video dual-stream mode. In the low-quality video stream adaptive mode (`AutoSimulcastStream`), when the receiver requests a low-quality video stream by calling [setRemoteVideoStreamType](API/api_irtcengine_setremotevideostreamtype.html) or [setRemoteVideoStreamTypeEx](API/api_irtcengineex_setremotevideostreamtypeex.html), the sender now processes requests from all users, expanding beyond the previous restriction to broadcasters only. This change ensures that the audience requests for low-quality video streams are implemented, thus improving the flexibility and adaptability of the dual-stream mode.

4. **Spatial audio effects usability improvement**

- This release optimizes the design of the [setZones](API/api_ibasespatialaudioengine_setzones.html) method, supporting the ability to set the `zones` parameter to `NULL`, indicating the clearing of all echo cancellation zones.
- As of this release, it is no longer necessary to unsubscribe from the audio streams of all remote users within the channel before calling the [ILocalSpatialAudioEngine](API/class_ilocalspatialaudioengine.html) method.

5. **Other Improvements**

This release also includes the following improvements:

- The [onLocalVideoStateChanged](API/callback_irtcengineeventhandler_onlocalvideostatechanged.html) callback is improved with the inclusion of the `LocalVideoStreamReasonScreenCaptureAutoFallback` enumeration, singaling unexpected errors during the screen sharing process (potentially due to window blocking failure), resulting in performance degradation without impacting the screen sharing process itself.
- This release optimizes the SDK's domain name resolution strategy, improving the stability of calling to resolve domain names in complex network environments.
- When passing in an image with transparent background as the virtual background image, the transparent background can be filled with customized color.
- This release adds the `earMonitorDelay` and `aecEstimatedDelay` members in [LocalAudioStats](API/class_localaudiostats.html) to report ear monitor delay and acoustic echo cancellation (AEC) delay, respectively.
- The [onPlayerCacheStats](API/callback_imediaplayersourceobserver_onplayercachestats.html) callback is added to report the statistics of the media file being cached. This callback is triggered once per second after file caching is started.
- The [onPlayerPlaybackStats](API/callback_imediaplayersourceobserver_onplayerplaybackstats.html) callback is added to report the statistics of the media file being played. This callback is triggered once per second after the media file starts playing. You can obtain information like the audio and video bitrate of the media file through [PlayerPlaybackStats](API/class_playerplaybackstats.html).

#### Issues fixed

This release fixed the following issues:

- When sharing two screen sharing video streams simultaneously, the reported `captureFrameRate` in the [onLocalVideoStats](API/callback_irtcengineeventhandler_onlocalvideostats.html) callback is 0, which is not as expected.
- When sharing in a specified screen area, the mouse coordinates within the shared area are inaccurate. When the mouse is near the border of the shared area, the mouse may not be visible in the shared screen. (Windows)
- The SDK failed to detect any changes in the audio routing after plugging in and out 3.5 mm earphones. (Windows)

#### API changes

**Added**

- The `subviewUid` member in [`VideoCanvas`](API/class_videocanvas.html)
- [enableCustomAudioLocalPlayback](API/api_irtcengine_enablecustomaudiolocalplayback.html)
- [queryDeviceScore](API/api_irtcengine_querydevicescore.html)
- The `CustomVideoSource` enumeration in [MediaSourceType](API/enum_mediasourcetype.html)
- The `RouteBluetoothDeviceA2DP` enumeration in [AudioRoute](API/enum_audioroute.html)
- [selectMultiAudioTrack](API/api_imediaplayer_selectmultiaudiotrack.html)
- [onPlayerCacheStats](API/callback_imediaplayersourceobserver_onplayercachestats.html)
- [onPlayerPlaybackStats](API/callback_imediaplayersourceobserver_onplayerplaybackstats.html)
- [PlayerPlaybackStats](API/class_playerplaybackstats.html)

**Modified**

- All `ERROR` fields in the following enumerations are changed to `REASON`:
- `LocalAudioStreamErrorOk`
- `LocalAudioStreamErrorFailure`
- `LocalAudioStreamErrorDeviceNoPermission`
- `LocalAudioStreamErrorDeviceBusy`
- `LocalAudioStreamErrorRecordFailure`
- `LocalAudioStreamErrorEncodeFailure`
- `LocalAudioStreamErrorRecordInvalidId` (Windows)
- `LocalAudioStreamErrorPlayoutInvalidId` (Windows)
- `LocalVideoStreamErrorOk`
- `LocalVideoStreamErrorFailure`
- `LocalVideoStreamErrorDeviceNoPermission`
- `LocalVideoStreamErrorDeviceBusy`
- `LocalVideoStreamErrorCaptureFailure`
- `LocalVideoStreamErrorCodecNotSupport`
- `LocalVideoStreamErrorDeviceNotFound`
- `LocalVideoStreamErrorDeviceDisconnected`
- `LocalVideoStreamErrorDeviceInvalidId`
- `LocalVideoStreamErrorScreenCaptureWindowMinimized`
- `LocalVideoStreamErrorScreenCaptureWindowClosed`
- `LocalVideoStreamErrorScreenCaptureWindowOccluded`
- `DirectCdnStreamingErrorOk`
- `DirectCdnStreamingErrorFailed`
- `DirectCdnStreamingErrorAudioPublication`
- `DirectCdnStreamingErrorVideoPublication`
- `DirectCdnStreamingErrorNetConnect`
- `DirectCdnStreamingErrorBadName`
- `PlayerErrorNone`
- `PlayerErrorInvalidArguments`
- `PlayerErrorInternal`
- `PlayerErrorNoResource`
- `PlayerErrorInvalidMediaSource`
- `PlayerErrorUnknownStreamType`
- `PlayerErrorObjNotInitialized`
- `PlayerErrorCodecNotSupported`
- `PlayerErrorVideoRenderFailed`
- `PlayerErrorInvalidState`
- `PlayerErrorUrlNotFound`
- `PlayerErrorInvalidConnectionState`
- `PlayerErrorSrcBufferUnderflow`
- `PlayerErrorInterrupted`
- `PlayerErrorNotSupported`
- `PlayerErrorTokenExpired`
- `PlayerErrorUnknown`
- `RtmpStreamPublishErrorOk`
- `RtmpStreamPublishErrorInvalidArgument`
- `RtmpStreamPublishErrorEncryptedStreamNotAllowed`
- `RtmpStreamPublishErrorConnectionTimeout`
- `RtmpStreamPublishErrorInternalServerError`
- `RtmpStreamPublishErrorRtmpServerError`
- `RtmpStreamPublishErrorTooOften`
- `RtmpStreamPublishErrorReachLimit`
- `RtmpStreamPublishErrorNotAuthorized`
- `RtmpStreamPublishErrorStreamNotFound`
- `RtmpStreamPublishErrorFormatNotSupported`
- `RtmpStreamPublishErrorNotBroadcaster`
- `RtmpStreamPublishErrorTranscodingNoMixStream`
- `RtmpStreamPublishErrorNetDown`
- `RtmpStreamPublishErrorInvalidPrivilege`
- `RtmpStreamUnpublishErrorOk`

**Deleted**

- `startChannelMediaRelay`
- `updateChannelMediaRelay`
- `startChannelMediaRelayEx`
- `updateChannelMediaRelayEx`
- `onChannelMediaRelayEvent`
- `ChannelMediaRelayEvent`


## v4.2.6

v4.2.6 was released on November xx, 2023.
Expand Down
Loading

0 comments on commit be28a30

Please sign in to comment.