Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Release/3.11.0 beta.1 #296

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ dependencies {
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.annotation:annotation:1.1.0"

implementation "io.dolby:sdk:[3.10.1,3.11)"
implementation "io.dolby:sdk:[3.11.0, 3.12)"

testImplementation("junit:junit:${JUNIT_VERSION}")
testImplementation("org.powermock:powermock-api-mockito2:${POWERMOCK_VERSION}")
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ MOCKITO_CORE_VERSION=2.26.0
POWERMOCK_VERSION=2.0.2
ROBOLECTRIC_VERSION=4.4
JUNIT_VERSION=4.13.2
COMMS_SDK_VERSION="3.10.1"
COMMS_SDK_VERSION="3.11.0-beta.1"
COMPONENT_NAME="react-native-sdk"
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class ConferenceListenOptionsMapper {
it.getOptionalInt(CONFERENCE_LISTEN_OPTIONS_MAX_VIDEO_FORWARDING)
?.let(::setMaxVideoForwarding)
it.getOptionalBoolean(CONFERENCE_LISTEN_OPTIONS_SPATIAL_AUDIO)?.let(::setSpatialAudio)
it.getString(CONFERENCE_LISTEN_OPTIONS_LISTEN_TYPE)?.let(ListenTypeMapper::convertToModel)?.let(::setListenType)
}
}
.build()
Expand All @@ -45,5 +46,6 @@ class ConferenceListenOptionsMapper {
private const val CONFERENCE_LISTEN_OPTIONS_ACCESS_TOKEN = "conferenceAccessToken"
private const val CONFERENCE_LISTEN_OPTIONS_MAX_VIDEO_FORWARDING = "maxVideoForwarding"
private const val CONFERENCE_LISTEN_OPTIONS_VIDEO_FORWARDING_STRATEGY = "videoForwardingStrategy"
private const val CONFERENCE_LISTEN_OPTIONS_LISTEN_TYPE = "listenType"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package io.dolby.sdk.comms.reactnative.mapper

import com.voxeet.sdk.models.ListenType
import java.security.InvalidParameterException

object ListenTypeMapper {
fun convertToRN(listenType: ListenType) = when(listenType) {
ListenType.REGULAR -> "REGULAR"
ListenType.MIXED -> "MIXED"
}

fun convertToModel(listenRNType: String) = when(listenRNType) {
REGULAR -> ListenType.REGULAR
MIXED -> ListenType.MIXED
else -> throw InvalidParameterException("Invalid value for listen type")
}

private const val REGULAR = "REGULAR"
private const val MIXED = "MIXED"
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class ParticipantMapper {
private fun toRNParticipantType(participantType: ParticipantType) = when (participantType) {
ParticipantType.USER -> "USER"
ParticipantType.LISTENER -> "LISTENER"
ParticipantType.MIXER_MIX -> "MIXER_MIX"
ParticipantType.SPEAKER,
ParticipantType.PSTN,
ParticipantType.MIXER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class RNSessionServiceModule(
sessionService
.close()
.rejectIfFalse { "Close session operation failed" }
.forward(promise)
.forward(promise, ignoreReturnType = true)
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package io.dolby.sdk.comms.reactnative.services.audio

import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.ReactContextBaseJavaModule
import com.facebook.react.bridge.ReactMethod
Expand Down Expand Up @@ -71,6 +70,34 @@ class RNRemoteAudioModule(
.forward(promise)
}

/**
* Sets the volume of a selected participant in non-Dolby Voice conferences to a preferred value between 0 and 1.
* Providing an unsupported number results in constraining the volume to either 0 or 1. Using the method for a selected participant
* after calling setOutputVolume overwrites the participant's volume. This method is supported in SDK 3.11 and later.
*
* @param participantRN The selected remote participant.
* @param volume The preferred volume level between 0 (no audio) and 1 (full volume).
*/
@ReactMethod
fun setParticipantVolume(participantRN: ReadableMap, volume: Float, promise: ReactPromise) {
Promises.promise(audioService.remote.setVolume(toParticipant(participantRN), volume))
.forward(promise, ignoreReturnType = true)
}

/**
* Sets the conference volume for the local participant.
* The method sets the volume of all remote participants to a preferred value between 0 and 1.
* Providing an unsupported volume results in constraining volume to a either 0 or 1.
* This method is supported in SDK 3.11 and later.
*
* @param volume
*/
@ReactMethod
fun setAllParticipantsVolume(volume: Float, promise: ReactPromise) {
Promises.promise(audioService.remote.setOutputVolume(volume))
.forward(promise, ignoreReturnType = true)
}

/**
* Gets [Participant] based on a React Native participant model. Throws
* [IllegalArgumentException] if participant id is invalid.
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/internal.CommandService.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The CommandService allows the application to send and receive text messages and

▸ **send**(`message`): `Promise`<`void`\>

Sends a message to all conference participants.
Sends a message to all conference participants. This method is not available for [mixed](doc:rn-client-sdk-enums-listentype#mixed) listeners.

#### Parameters

Expand Down
140 changes: 6 additions & 134 deletions docs/classes/internal.ConferenceService.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,12 @@ The ConferenceService allows an application to manage the conference life-cycle
- [leave](internal.ConferenceService.md#leave)
- [mute](internal.ConferenceService.md#mute)
- [replay](internal.ConferenceService.md#replay)
- [setAudioProcessing](internal.ConferenceService.md#setaudioprocessing)
- [setMaxVideoForwarding](internal.ConferenceService.md#setmaxvideoforwarding)
- [videoForwarding](internal.ConferenceService.md#videoforwarding)
- [startAudio](internal.ConferenceService.md#startaudio)
- [startScreenShare](internal.ConferenceService.md#startscreenshare)
- [startVideo](internal.ConferenceService.md#startvideo)
- [stopAudio](internal.ConferenceService.md#stopaudio)
- [stopScreenShare](internal.ConferenceService.md#stopscreenshare)
- [setSpatialDirection](internal.ConferenceService.md#setspatialdirection)
- [setSpatialEnvironment](internal.ConferenceService.md#setspatialenvironment)
- [setSpatialPosition](internal.ConferenceService.md#setspatialposition)
- [stopVideo](internal.ConferenceService.md#stopvideo)
- [updatePermissions](internal.ConferenceService.md#updatepermissions)
- [onStatusChange](internal.ConferenceService.md#onstatuschange)
- [onPermissionsChange](internal.ConferenceService.md#onpermissionschange)
Expand Down Expand Up @@ -271,7 +265,7 @@ ___

▸ **kick**(`participant`): `Promise`<`void`\>

Kicks a participant out of the current conference. This actions requires you to be conference owner or to have the adequate permissions to kick a participant.
Kicks a participant out of the current conference. This actions requires you to be conference owner or to have the adequate permissions to kick a participant. This method is not available for [mixed](doc:rn-client-sdk-enums-listentype#mixed) listeners.

#### Parameters

Expand Down Expand Up @@ -347,47 +341,6 @@ Replays a previously recorded conference. For more information, see the [Recordi

___

### setAudioProcessing

▸ **setAudioProcessing**(`options?`): `Promise`<`void`\>

**Note**: This method is deprecated in SDK 3.7 and replaced with the [setCaptureMode](doc:rn-client-sdk-references-localaudio#setcapturemode) method.

Enables and disables audio processing for a conference participant.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `options` | [`AudioProcessingOptions`](../interfaces/internal.AudioProcessingOptions.md) | The AudioProcessingOptions model includes the AudioProcessingSenderOptions model responsible for enabling and disabling audio processing. |

#### Returns

`Promise`<`void`\>

___

### setMaxVideoForwarding

▸ **setMaxVideoForwarding**(`max?`, `prioritizedParticipants?`): `Promise`<`any`\>

Sets the maximum number of video streams that may be transmitted to the local participant.

This method is deprecated in SDK 3.6.

#### Parameters

| Name | Type | Default value | Description |
| :------ | :------ | :------ | :------ |
| `max` | `number` | `4` | The maximum number of video streams that may be transmitted to the local participant. The valid parameter values are between 0 and 4. By default, the parameter is set to 4. |
| `prioritizedParticipants` | [`Participant`](../interfaces/internal.Participant.md)[] | `[]` | The list of the prioritized participants. This parameter allows using a pin option to prioritize specific participant's video streams and display their videos even when these participants do not talk. |

#### Returns

`Promise`<`any`\>

___

### videoForwarding

▸ **videoForwarding**(`options`): `Promise`<`any`\>
Expand All @@ -398,7 +351,7 @@ Sets the video forwarding functionality for the local participant. The method al
- Prioritizing specific participants' video streams that need to be transmitted to the local participant
- Changing the [video forwarding strategy](doc:rn-client-sdk-enums-videoforwardingstrategy) that defines how the SDK should select conference participants whose videos will be received by the local participant

This method is available only in SDK 3.6 and later.
This method is available only in SDK 3.6 and later and is not available for [mixed](doc:rn-client-sdk-enums-listentype#mixed) listeners.

#### Parameters

Expand All @@ -412,33 +365,12 @@ This method is available only in SDK 3.6 and later.

___

### startAudio

▸ **startAudio**(`participant`): `Promise`<`void`\>

**Note**: This method is deprecated in SDK 3.7 and replaced with the **start** methods that are available in the [LocalAudio](doc:rn-client-sdk-references-localaudio) and [RemoteAudio](doc:rn-client-sdk-references-remoteaudio) models.

Starts audio transmission between the local client and a conference. The startAudio method impacts only the audio streams that the local participant sends and receives; the method does not impact the audio transmission between remote participants and a conference and does not allow the local participant to force sending remote participants’ streams to the conference or to the local participant. Depending on the specified participant in the `participant` parameter, the startAudio method starts the proper audio transmission:
- When the specified participant is the local participant, startAudio ensures sending local participant’s audio from the local client to the conference.
- When the specified participant is a remote participant, startAudio ensures sending remote participant’s audio from the conference to the local client. This allows the local participant to unmute remote participants who are locally muted through the [stopAudio](#stopaudio) method.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `participant` | [`Participant`](../interfaces/internal.Participant.md) | The selected participant. If you wish to transmit the local participant's audio stream to the conference, provide the local participant's object. If you wish to receive the specific remote participants' audio streams, provide these remote participants' objects. |

#### Returns

`Promise`<`void`\>

___

### startScreenShare

▸ **startScreenShare**(): `Promise`<`void`\>

Starts a screen sharing session.
Starts a screen sharing session. The method is available only to participants who joined a conference using the [join](doc:rn-client-sdk-conferenceservice#join) method; it is not available for listeners.

The ScreenShare with iOS document (https://docs.dolby.io/communications-apis/docs/screenshare-with-ios) describes how to set up screen-share outside the application.
Instead of setting the following properties:
- CommsSDK.shared.appGroup = "YOUR_APP_GROUP"
Expand All @@ -447,47 +379,7 @@ Instead of setting the following properties:
- Add a new `DolbyioSdkAppGroupKey` as a string type and enter the group name ("YOUR_APP_GROUP").
- Add a new `DolbyioSdkPreferredExtensionKey` as a string type and enter the broadcast extension bundle ID ("YOUR_BROADCAST_EXTENSION_BUNDLE_ID").

#### Returns

`Promise`<`void`\>

___

### startVideo

▸ **startVideo**(`participant`): `Promise`<`void`\>

**Note**: This method is deprecated in SDK 3.7 and replaced with the **start** methods that are available in the [LocalVideo](doc:rn-client-sdk-references-localvideo) and [RemoteVideo](doc:rn-client-sdk-references-remotevideo) models.

Notifies the server to either start sending the local participant's video stream to the conference or start sending a remote participant's video stream to the local participant. The startVideo method does not control the remote participant's video stream; if a remote participant does not transmit any video stream, the local participant cannot change it using the startVideo method.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `participant` | [`Participant`](../interfaces/internal.Participant.md) | The participant who will receive the video stream, either remote or local. |

#### Returns

`Promise`<`void`\>

___

### stopAudio

▸ **stopAudio**(`participant`): `Promise`<`void`\>

**Note**: This method is deprecated in SDK 3.7 and replaced with the **stop** methods that are available in the [LocalAudio](doc:rn-client-sdk-references-localaudio) and [RemoteAudio](doc:rn-client-sdk-references-remoteaudio) models.

Stops audio transmission between the local client and a conference. The stopAudio method impacts only the audio streams that the local participant sends and receives; the method does not impact the audio transmission between remote participants and a conference and does not allow the local participant to stop sending remote participants’ streams to the conference. Depending on the specified participant in the `participant` parameter, the stopAudio method stops the proper audio transmission:
- When the specified participant is the local participant, stopAudio stops sending local participant’s audio from the local client to the conference.
- When the specified participant is a remote participant, stopAudio stops sending remote participant’s audio from the conference to the local client. This allows the local participant to locally mute remote participants.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `participant` | [`Participant`](../interfaces/internal.Participant.md) | The selected participant. If you wish to not transmit the local participant's audio stream to the conference, provide the local participant's object. If you wish to not receive the specific remote participants' audio streams, provide these remote participants' objects. |
The SDK 3.10 and earlier support sharing only one screen per conference. The SDK 3.11 and later allow sharing two screens in one conference, so two participants can share their screens at the same time.

#### Returns

Expand All @@ -499,7 +391,7 @@ ___

▸ **stopScreenShare**(): `Promise`<`void`\>

Stops a screen sharing session.
Stops a screen sharing session. The method is available only to participants who joined a conference using the [join](doc:rn-client-sdk-conferenceservice#join) method; it is not available for listeners.

#### Returns

Expand Down Expand Up @@ -633,26 +525,6 @@ For example, if a local participant Eric, who does not have a set direction, cal

___

### stopVideo

▸ **stopVideo**(`participant`): `Promise`<`void`\>

**Note**: This method is deprecated in SDK 3.7 and replaced with the **stop** methods that are available in the [LocalVideo](doc:rn-client-sdk-references-localvideo) and [RemoteVideo](doc:rn-client-sdk-references-remotevideo) models.

Notifies the server to either stop sending the local participant's video stream to the conference or stop sending a remote participant's video stream to the local participant.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `participant` | [`Participant`](../interfaces/internal.Participant.md) | The participant who wants to stop receiving a video stream. |

#### Returns

`Promise`<`void`\>

___

### updatePermissions

▸ **updatePermissions**(`participantPermissions`): `Promise`<`void`\>
Expand Down
2 changes: 2 additions & 0 deletions docs/classes/internal.FilePresentationService.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ The FilePresentationService allows presenting files during a conference. The Dol

**10.** The presenter and the viewers receive [information](doc:rn-client-sdk-models-filepresentation) about the end of the file presentation via the [onFilePresentationChange](#onfilepresentationchange) listener.

The service is available only to participants who joined a conference using the [join](doc:rn-client-sdk-conferenceservice#join) method; it is not available for listeners.

## Table of contents

### Constructors
Expand Down
8 changes: 3 additions & 5 deletions docs/classes/internal.LocalAudio.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,9 @@ ___

▸ **start**(): `Promise`<`void`\>

Starts sending the local participant’s audio streams from the local client to the conference.
This method is not available for listeners in Dolby Voice conferences.
Starts sending the local participant’s audio stream to a conference. The method is available only to participants who joined a conference using the [join](doc:rn-client-sdk-conferenceservice#join) method; it is not available for listeners.

The method requires up to a few seconds to become effective.
The method requires a few seconds to become effective.

#### Returns

Expand All @@ -115,8 +114,7 @@ ___

▸ **stop**(): `Promise`<`void`\>

Stops sending local participant’s audio from the local client to the conference.
This method is not available for listeners in Dolby Voice conferences.
Stops sending local participant’s audio to a conference. The method is available only to participants who joined a conference using the [join](doc:rn-client-sdk-conferenceservice#join) method; it is not available for listeners.

The method requires up to a few seconds to become effective.

Expand Down
5 changes: 3 additions & 2 deletions docs/classes/internal.LocalVideo.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This model is supported only in SDK 3.7 and later.

▸ **start**(): `Promise`<`void`\>

Enables the local participant's video and sends the video to a conference.
Enables the local participant's video and sends the video to a conference. The method is available only to participants who joined a conference using the [join](doc:rn-client-sdk-conferenceservice#join) method; it is not available for listeners.

#### Returns

Expand All @@ -41,7 +41,8 @@ ___

▸ **stop**(): `Promise`<`void`\>

Disables the local participant's video and stops sending the video to a conference.
Disables the local participant's video and stops sending the video to a conference. The method is available only to participants who joined a conference using the [join](doc:rn-client-sdk-conferenceservice#join) method; it is not available for listeners.

Use this method only when the current participant is at the conference.

#### Returns
Expand Down
Loading
Loading