Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
680048f
feat: upgrade to 3.2.0
LichKing-2234 Dec 2, 2020
4ee51a9
feat: upgrade to 3.2.0
LichKing-2234 Dec 2, 2020
fcb57cc
feat: upgrade to 3.2.0
LichKing-2234 Dec 2, 2020
642eb32
Merge branch 'master' into dev/3.2.0
LichKing-2234 Dec 2, 2020
e10a633
update en doc
TingChen2020 Dec 3, 2020
984d807
Merge pull request #305 from TingChen2020/dev/3.2.0
LichKing-2234 Dec 4, 2020
76c3a08
update docs
TingChen2020 Dec 15, 2020
daef6ff
Merge pull request #311 from TingChen2020/dev/3.2.0
LichKing-2234 Dec 15, 2020
3a55997
feat: add `setClientRole(role: ClientRole, options?: ClientRoleOption…
LichKing-2234 Dec 15, 2020
2fef3ae
feat: add `setClientRole(role: ClientRole, options?: ClientRoleOption…
LichKing-2234 Dec 15, 2020
721604e
feat: add `setClientRole(role: ClientRole, options?: ClientRoleOption…
LichKing-2234 Dec 15, 2020
da3222a
Merge branch 'master' into dev/3.2.0
LichKing-2234 Dec 15, 2020
7a53134
Update doc
TingChen2020 Dec 16, 2020
561b3fd
Merge branch 'master' into dev/3.2.0
LichKing-2234 Dec 17, 2020
ddeaefb
Merge branch 'master' into dev/3.2.0
LichKing-2234 Dec 17, 2020
6ebc3a1
minor editorial improvement
TingChen2020 Dec 17, 2020
d73653c
minor changes
TingChen2020 Dec 18, 2020
daefc68
style: use shorthand arguments for lambda
LichKing-2234 Dec 18, 2020
56ab25b
fix: `MetadataReceived` event parameters bug
LichKing-2234 Dec 18, 2020
9ab28a7
fix: `MetadataReceived` event parameters bug
LichKing-2234 Dec 18, 2020
a290e73
fix: use the better way to fix rendering problems
LichKing-2234 Dec 18, 2020
75f572d
fix: use the better way to fix rendering problems
LichKing-2234 Dec 18, 2020
c8a08e5
Merge branch 'master' into dev/3.2.0
LichKing-2234 Dec 18, 2020
de52ca6
Merge branch 'master' into dev/3.2.0
LichKing-2234 Dec 18, 2020
558cc61
merge: dev/3.2.0
LichKing-2234 Dec 18, 2020
eb257ec
Merge commit 'c8a08e551ad150f3f52c5c5864e5b80255d6505a' into dev/3.2.0
LichKing-2234 Dec 18, 2020
1966cd8
Merge branch 'rc/3.1.+' into dev/3.2.0
LichKing-2234 Dec 18, 2020
10da71d
docs: Update docs
LichKing-2234 Dec 18, 2020
76403e8
Merge branch 'master' into dev/3.2.0
LichKing-2234 Dec 21, 2020
f301dc4
chore: release 3.2.0-rc.0
LichKing-2234 Dec 21, 2020
503c14d
Add doc changes between v3.1.2 and v3.2.0
TingChen2020 Dec 21, 2020
ac146fa
Merge pull request #315 from TingChen2020/dev/3.2.0
LichKing-2234 Dec 22, 2020
3dcc489
feat: upgrade native SDK to 3.2.1
LichKing-2234 Dec 23, 2020
a98f6bd
chore: release 3.2.0
LichKing-2234 Dec 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/common/Classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1364,10 +1364,12 @@ export interface FacePositionInfo {

/**
* The detailed options of a user.
*
* @since v3.2.0.
*/
export class ClientRoleOptions {
/**
* The latency level of an audience member in a interactive live streaming. See AgoraAudienceLatencyLevelType.
* The latency level of an audience member in a live interactive streaming. See {@link AudienceLatencyLevelType}.
*/
audienceLatencyLevel: AudienceLatencyLevelType;

Expand Down
10 changes: 5 additions & 5 deletions src/common/Enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export enum AudioReverbPreset {
*/
FX_VOCAL_CONCERT = 0x00100002,
/**
* The reverberation style typical of an uncle’s voice.
* The reverberation style typical of a middle-aged man’s voice.
*/
FX_UNCLE = 0x00100003,
/**
Expand Down Expand Up @@ -2481,7 +2481,7 @@ export enum AudioEffectPreset {
RoomAcoustics3DVoice = 0x02010800,

/**
* The voice of an uncle.
* The voice of a middle-aged man.
*
* **Note**
*
Expand All @@ -2492,7 +2492,7 @@ export enum AudioEffectPreset {
VoiceChangerEffectUncle = 0x02020100,

/**
* The voice of an uncle.
* The voice of an old man.
*
* **Note**
*
Expand Down Expand Up @@ -2665,11 +2665,11 @@ export enum VoiceBeautifierPreset {
}

/**
* The latency level of an audience member in a interactive live streaming.
* The latency level of an audience member in interactive live streaming.
*
* **Note**
*
* Takes effect only when the user role is AgoraClientRoleBroadcaster.
* Takes effect only when the user role is `Broadcaster`.
*/
export enum AudienceLatencyLevelType {
/**
Expand Down
24 changes: 16 additions & 8 deletions src/common/RtcChannel.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,20 @@ export default class RtcChannel implements RtcChannelInterface {
}

/**
* Sets the role of a user.
* Sets the role of a user in live interactive streaming.
*
* This method sets the role of a user, such as a host or an audience member. In a `LiveBroadcasting` channel,
* only a host can call the [`publish`]{@link publish} method in the [`RtcChannel`]{@link RtcChannel} class.
*
* A successful call of this method triggers the following callbacks:
* You can call this method either before or after joining the channel to set the user role as audience or host. If you call this method to switch the user role after joining the channel, the SDK triggers the following callbacks:
* - The local client: [`ClientRoleChanged`]{@link RtcChannelEvents.ClientRoleChanged}.
* - The remote client: [`UserJoined`]{@link RtcChannelEvents.UserJoined}
* or [`UserOffline(BecomeAudience)`]{@link UserOfflineReason.BecomeAudience}.
* @param role The role of the user.
* - The remote client: [`UserJoined`]{@link RtcChannelEvents.UserJoined} or [`UserOffline(BecomeAudience)`]{@link UserOfflineReason.BecomeAudience}.
*
* **Note**
* - This method applies to the `LiveBroadcasting` profile only (when the `profile` parameter in `setChannelProfile` is set as `LiveBroadcasting`).
* - As of v3.2.0, this method can set the user level in addition to the user role.
* - The user role determines the permissions that the SDK grants to a user, such as permission to send local streams, receive remote streams, and push streams to a CDN address.
* - The user level determines the level of services that a user can enjoy within the permissions of the user's role. For example, an audience can choose to receive remote streams with low latency or ultra low latency. **Levels affect prices**.
*
* @param role The role of a user in interactive live streaming. See {@link ClientRole}.
* @param options? The detailed options of a user, including user level. See {@link ClientRoleOptions}.
*
* @returns
* - 0(NoError): Success.
Expand All @@ -228,6 +232,8 @@ export default class RtcChannel implements RtcChannelInterface {
* - If you want to join the same channel from different devices, ensure that the UIDs in all devices are different.
* - Ensure that the app ID you use to generate the token is the same with the app ID used when creating the [`RtcEngine`]{@link RtcEngine} instance.
*
* Once the user joins the channel (switches to another channel), the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. If you do not want to subscribe to a specified stream or all remote streams, call the `mute` methods accordingly.
*
* @param token The token generated at your server.
* - In situations not requiring high security: You can use the temporary token generated at Console. For details, see [Get a temporary token](https://docs.agora.io/en/Agora%20Platform/token?platform=All%20Platforms#get-a-temporary-token).
* - In situations requiring high security: Set it as the token generated at your server. For details, see [Generate a token](https://docs.agora.io/en/Agora%20Platform/token?platform=All%20Platforms#generatetoken).
Expand Down Expand Up @@ -268,6 +274,8 @@ export default class RtcChannel implements RtcChannelInterface {
* - If you want to join the same channel from different devices, ensure that the user accounts in all devices are different.
* - Ensure that the app ID you use to generate the token is the same with the app ID used when creating the [`RtcEngine`]{@link RtcEngine} instance.
*
* Once the user joins the channel (switches to another channel), the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. If you do not want to subscribe to a specified stream or all remote streams, call the `mute` methods accordingly.
*
* @param token The token generated at your server.
* - In situations not requiring high security: You can use the temporary token generated at Console. For details, see [Get a temporary token](https://docs.agora.io/en/Agora%20Platform/token?platform=All%20Platforms#get-a-temporary-token).
* - In situations requiring high security: Set it as the token generated at your server. For details, see [Generate a token](https://docs.agora.io/en/Agora%20Platform/token?platform=All%20Platforms#generatetoken).
Expand Down
23 changes: 17 additions & 6 deletions src/common/RtcEngine.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,20 @@ export default class RtcEngine implements RtcEngineInterface {
}

/**
* Sets the role of a user ([`LiveBroadcasting`]{@link ChannelProfile.LiveBroadcasting} only).
* Sets the role of a user in live interactive streaming.
*
* This method sets the role of a user, such as a host or an audience (default), before joining a channel.
*
* This method can be used to switch the user role after a user joins a channel. In the [`LiveBroadcasting`]{@link ChannelProfile.LiveBroadcasting} profile, when a user switches user roles after joining a channel, a successful call of this method triggers the following callbacks:
* You can call this method either before or after joining the channel to set the user role as audience or host. If you call this method to switch the user role after joining the channel, the SDK triggers the following callbacks:
* - The local client: [`ClientRoleChanged`]{@link RtcEngineEvents.ClientRoleChanged}.
* - The remote client: [`UserJoined`]{@link RtcEngineEvents.UserJoined} or [`UserOffline`]{@link RtcEngineEvents.UserOffline} ([`BecomeAudience`]{@link UserOfflineReason.BecomeAudience}).
*
* @param role Sets the role of a user.
* **Note**
* - This method applies to the `LiveBroadcasting` profile only (when the `profile` parameter in `setChannelProfile` is set as `LiveBroadcasting`).
* - As of v3.2.0, this method can set the user level in addition to the user role.
* - The user role determines the permissions that the SDK grants to a user, such as permission to send local streams, receive remote streams, and push streams to a CDN address.
* - The user level determines the level of services that a user can enjoy within the permissions of the user's role. For example, an audience can choose to receive remote streams with low latency or ultra low latency. **Levels affect prices**.
*
* @param role The role of a user in interactive live streaming. See {@link ClientRole}.
* @param options? The detailed options of a user, including user level. See {@link ClientRoleOptions}.
*
* @returns
* - 0(NoError): Success.
Expand Down Expand Up @@ -299,6 +304,8 @@ export default class RtcEngine implements RtcEngineInterface {
* When the connection between the client and Agora server is interrupted due to poor network conditions,
* the SDK tries reconnecting to the server. When the local client successfully rejoins the channel, the SDK triggers the [`RejoinChannelSuccess`]{@link RtcEngineEvents.RejoinChannelSuccess} callback on the local client.
*
* Once the user joins the channel (switches to another channel), the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. If you do not want to subscribe to a specified stream or all remote streams, call the `mute` methods accordingly.
*
* **Note**
*
* A channel does not accept duplicate uids, such as two users with the same `uid`. If you set `uid` as `0`, the system automatically assigns a uid.
Expand Down Expand Up @@ -355,6 +362,8 @@ export default class RtcEngine implements RtcEngineInterface {
* After the user successfully switches to another channel, the [`LeaveChannel`]{@link RtcEngineEvents.LeaveChannel} and [`JoinChannelSuccess`]{@link RtcEngineEvents.JoinChannelSuccess} callbacks are triggered to
* indicate that the user has left the original channel and joined a new one.
*
* Once the user joins the channel (switches to another channel), the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. If you do not want to subscribe to a specified stream or all remote streams, call the `mute` methods accordingly.
*
* **Note**
*
* This method applies to the [`Audience`]{@link ClientRole.Audience} role in a [`LiveBroadcasting`]{@link ChannelProfile.LiveBroadcasting} channel only.
Expand Down Expand Up @@ -595,6 +604,8 @@ export default class RtcEngine implements RtcEngineInterface {
*
* - The remote client: [`UserJoined`]{@link RtcEngineEvents.UserJoined} and [`UserInfoUpdated`]{@link RtcEngineEvents.UserInfoUpdated}, if the user joining the channel is in the [`Communication`]{@link ChannelProfile.Communication} profile, or is a [`Broadcaster`]{@link ClientRole.Broadcaster} in the [`LiveBroadcasting`]{@link ChannelProfile.LiveBroadcasting} profile.
*
* Once the user joins the channel (switches to another channel), the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. If you do not want to subscribe to a specified stream or all remote streams, call the `mute` methods accordingly.
*
* **Note**
*
* To ensure smooth communication, use the same parameter type to identify the user.
Expand Down Expand Up @@ -2649,7 +2660,7 @@ export default class RtcEngine implements RtcEngineInterface {
* - 3: Japanese pentatonic scale.
*
* @param param2
* - You need to set `param2` to 0.
* - If you set `preset` to `RoomAcoustics3DVoice`, you need to set `param2` to `0`.
* - If you set `preset` to `PitchCorrection`, `param2` sets the tonic pitch of the pitch correction effect:
* - 1: A
* - 2: A#
Expand Down