diff --git a/docs/android-core/Introduction.mdx b/docs/android-core/Introduction.mdx index 640261ba0..535c4431f 100644 --- a/docs/android-core/Introduction.mdx +++ b/docs/android-core/Introduction.mdx @@ -1,6 +1,6 @@ --- title: Introduction -sidebar_position: 3 +sidebar_position: 4 sidebar_class_name: module-seperation --- diff --git a/docs/android-core/pre-call/_category_.json b/docs/android-core/pre-call/_category_.json index 62c5eb9e7..22e5bdec8 100644 --- a/docs/android-core/pre-call/_category_.json +++ b/docs/android-core/pre-call/_category_.json @@ -1,5 +1,5 @@ { - "position": 2, + "position": 3, "label": "Pre-call", "collapsible": true, "className":"pre-call-docs" diff --git a/docs/android-core/quickstart.mdx b/docs/android-core/quickstart.mdx index b5fea12cb..4cc59b055 100644 --- a/docs/android-core/quickstart.mdx +++ b/docs/android-core/quickstart.mdx @@ -4,7 +4,7 @@ tags: - quickstart - setup slug: / -sidebar_position: 1 +sidebar_position: 2 --- import Tabs from '@theme/Tabs'; diff --git a/docs/android-core/upgrade-v2/1-introduction.mdx b/docs/android-core/upgrade-v2/1-introduction.mdx new file mode 100644 index 000000000..cc857bc16 --- /dev/null +++ b/docs/android-core/upgrade-v2/1-introduction.mdx @@ -0,0 +1,68 @@ +--- +title: Introduction +sidebar_position: 1 +tags: + - android-core + - v2 +--- + +With the v2 release of the Dyte Core SDK, we're introducing a major upgrade focused on making the development experience simpler, more consistent, and intuitive. This upgrade introduces breaking changes across four key areas: + +### 1. Migration to V2 REST API Terminology + +- `meeting.meta.roomName` -> `meeting.meta.meetingId` +- `DyteMeetingParticipant.clientSpecificId` -> `DyteMeetingParticipant.customParticipantId` +- Removed `DyteMeetingInfo` (V1) + + +### 2. Removal of Deprecated APIs + +We have removed deprecated methods and properties in favour of improved, uniform, and clearer versions. + +- Removed `DyteParticipants.screenshares` (use `DyteParticipants.screenShares`). The deprecated type `DyteScreenShareMeetingParticipant` has also been removed +- **Chat Methods**: Removed deprecated file and image send methods. The new lambda-based methods take more reliable `Uri`s & return proper errors + - File message methods: + - Removed: + - `sendFileMessage(filePath: String)` + - `sendFileMessage(filePath: String, fileName: String)` + - `sendFileMessage(fileUri: Uri)` + - Use instead: + - `sendFileMessage(fileUri: Uri, onResult: (ChatFileError?) -> Unit)` + - Removed: + - `sendFileMessage(filePath: String, peerIds: List)` + - `sendFileMessage(fileUri: Uri, peerIds: List)` + - Use instead: + - `sendFileMessage(fileUri: Uri, peerIds: List, onResult: (ChatFileError?) -> Unit)` + - Image message methods: + - Removed: + - `sendImageMessage(filePath: String, fileName: String)` + - `sendImageMessage(imageUri: Uri)` + - `sendImageMessage(imagePath: String)` + - Use instead: + - `sendImageMessage(imageUri: Uri, onResult: (ChatFileError?) -> Unit)` + - Removed: + - `sendImageMessage(imagePath: String, peerIds: List)` + - `sendImageMessage(imageUri: Uri, peerIds: List)` + - `sendImageMessage(filePath: String, fileName: String, peerIds: List)` + - Use instead: + - `sendImageMessage(imageUri: Uri, peerIds: List, onResult: (ChatFileError?) -> Unit)` +- Removed deprecated listener callbacks: + - `DyteSelfEventsListener.onStageStatusUpdated`. Use `DyteStageEventListener.onStageStatusUpdated()` + - `DyteStageEventListener.onPresentRequestAccepted(participant: DyteJoinedMeetingParticipant)` + - `DyteMeetingRoomEventsListener.onActiveTabUpdate(id: String, tabType: ActiveTabType)`. + Use `DyteMeetingRoomEventsListener.onActiveTabUpdate(meeting: DyteMobileClient, activeTab: ActiveTab)` + + +### 3. Revamped Error Handling + +- Errors are categorised by modules, such as `ChatError`, `SelfError`, and `MeetingError` +- All public APIs provide proper errors and additional error data where applicable for better debugging +- Utilises Kotlin sealed classes for better type safety + + +### 4. API Structural Changes + +We made a few direct breaking changes in our APIs to simplify the types, make methods more intuitive and ensure uniformity across platforms.  +For example, `DyteMeetingParticipant` has been restructured to align with real-world entities. + +Learn more about the direct breaking changes and migration instructions on the next page. \ No newline at end of file diff --git a/docs/android-core/upgrade-v2/2-breaking-changes-migration.mdx b/docs/android-core/upgrade-v2/2-breaking-changes-migration.mdx new file mode 100644 index 000000000..918ffe73b --- /dev/null +++ b/docs/android-core/upgrade-v2/2-breaking-changes-migration.mdx @@ -0,0 +1,185 @@ +--- +title: Breaking Changes and Migration Guide +sidebar_position: 2 +tags: + - android-core + - v2 +--- + +This section provides details about the additional breaking changes made in Dyte Core SDK v2 and provides migration guidance. +The changes span multiple modules, mainly simplifying the APIs or renaming them to ensure uniformity across the platforms. + + +### Changes in Participant Hierarchy and Simplified Types + +The participant hierarchy has been simplified to align better with real-world entities: + +- **Old Structure**: + - `DyteMeetingParticipant` was the parent class with direct subtypes: + - `DyteJoinedMeetingParticipant` + - `DyteWaitlistedParticipant` + - `DyteJoinedMeetingParticipant` had two subtypes: + - `DyteScreenShareMeetingParticipant` + - `DyteSelfParticipant` (local user) + +- **New Structure**: + - `DyteMeetingParticipant` still represents a participant in a meeting which is simply either: + - `DyteSelfParticipant` (local user) or + - `DyteRemoteParticipant` (other participants in the meeting) + +- Moved methods for managing waiting room requests to `DyteParticipants`: + - `DyteWaitlistedParticipant.acceptWaitListedRequest()` -> `DyteParticipants.acceptWaitingRoomRequest(id)` + - `DyteWaitlistedParticipant.rejectWaitListedRequest()` -> `DyteParticipants.rejectWaitingRoomRequest(id)` + +The old participant hierarchy was complex, with certain types representing temporary states or behaviour at runtime. +The new structure simplifies this by clearly differentiating between the local user and remote participants. + +**Migration Instructions**: + +- Replace instances of `DyteJoinedMeetingParticipant` with `DyteRemoteParticipant`. +- Replace any usage of `DyteScreenShareMeetingParticipant` with `DyteMeetingParticipant` or its subtype. +- `DyteSelfParticipant` is now a direct subtype of `DyteMeetingParticipant`. +- Update the Waiting Room management logic to use APIs from `DyteParticipants` for accepting/rejecting waiting room requests. + + +### Changes in DyteMeetingRoomEventsListener Connection State Callbacks + +The following connection state callbacks have been removed: + +- `onMeetingRoomDisconnected`, `onConnectingToMeetingRoom`, `onConnectedToMeetingRoom`, +`onDisconnectedFromMeetingRoom`, `onMeetingRoomConnectionFailed`, `onReconnectingToMeetingRoom`, +`onReconnectedToMeetingRoom`, `onMeetingRoomReconnectionFailed` + +These callbacks have been consolidated into a single unified callback: +`onSocketConnectionUpdate(newState: SocketConnectionState)` + +**Migration Instructions**: + +- Move all connection state handling, mainly reconnection logic from the old callbacks to `onSocketConnectionUpdate()`. +The new callback provides a `SocketConnectionState` parameter that represents the current state of the meeting connection. + + +`DyteMeetingInfoV2.baseUrl` has been renamed to `DyteMeetingInfoV2.baseDomain`. This change is applicable only +if you are using a white-labeled domain. + + +### Other Breaking Changes module-wise + +#### 1. DyteMobileClient (meeting) + +- The following methods now return `MeetingError` in the `onFailure` callback instead of `DyteError`: + - `init()`, `leaveRoom()`, `release()` +- Renamed some methods for adding/removing listeners to align with the respective listener names: + - `addParticipantEventsListener()` -> `addParticipantsEventListener()` + - `addPollsEventsListener()` -> `addPollsEventListener()` + - `addStageEventsListener()` -> `addStageEventListener()` + - `addLivestreamEventListener()` -> `addLivestreamEventListener()` +- Changes in `DyteMeetingRoomEventsListener` callbacks: + - Failure callbacks now return standardised `MeetingError` instead of `Exception`: + - `onMeetingInitFailed(exception: Exception)` -> `onMeetingInitFailed(error: MeetingError)` + - `onMeetingRoomJoinFailed(exception: Exception)` -> `onMeetingRoomJoinFailed(error: MeetingError)` + - Relevant callback methods now include `DyteMobileClient` as a parameter, making it easier to access meeting object + - `onMeetingInitCompleted()` -> `onMeetingInitCompleted(meeting: DyteMobileClient)` + - `onMeetingRoomJoinCompleted()` -> `onMeetingRoomJoinCompleted(meeting: DyteMobileClient)` + - `onActiveTabUpdate(activeTab: ActiveTab)` -> `onActiveTabUpdate(meeting: DyteMobileClient, activeTab: ActiveTab)` + +#### 2. DyteSelfParticipant (meeting.localUser) + +- Renamed the following screen share methods to make the name casing of "ScreenShare" uniform with the rest of the SDK: + - `enableScreenshare()` -> `enableScreenShare()` + - `disableScreenshare()` -> `disableScreenShare()` +- Merged `onScreenShareStarted` & `onScreenShareStopped` into a single callback: `onScreenShareUpdate(isEnabled: Boolean)` +- Moved `onRoomMessage()` callback from `DyteSelfEventsListener` to `DyteParticipantsEventListener` and renamed it to `onNewBroadcastMessage()` +- Removed the unused `onProximityChanged(isNear: Boolean)` + +**Migration Instructions**: + +- Update enable/disable screen share method names +- Replace the old screen share callbacks with the new `onScreenShareUpdate()` callback +- Move the broadcast message handling logic to `DyteParticipantsEventListener.onNewBroadcastMessage()` callback + +#### 3. DyteParticipants (meeting.participants) + +- `meeting.participants` now contains data only related to remote participants, excluding the local user +- Changes in `DyteParticipantsEventListener` callbacks: + - Callbacks are now given only for remote participant events. Local user changes are dispatched to `DyteSelfEventsListener` + - Listener renamed from `DyteParticipantEventsListener` to `DyteParticipantsEventListener` + - Merged `onScreenShareStarted` & `onScreenShareEnded` into a single callback: + `onScreenShareUpdate(participant: DyteRemoteParticipant, isEnabled: Boolean)` + - Removed `onNoActiveSpeaker()`. Now `onActiveSpeakerChanged(participant: DyteRemoteParticipant?)` gets a null value when active participant is cleared + - Removed unused, uncalled `onScreenSharesUpdated()`, `onSetAsActiveSpeaker()`, & `onRemovedAsActiveSpeaker()` + - Following callbacks have been tweaked for consistency & clarity: + - `onAudioUpdate(audioEnabled: Boolean, participant: DyteMeetingParticipant)` -> `onAudioUpdate(participant: DyteRemoteParticipant, isEnabled: Boolean)` + - `onVideoUpdate(videoEnabled: Boolean, participant: DyteMeetingParticipant)` -> `onVideoUpdate(participant: DyteRemoteParticipant, isEnabled: Boolean)` + - `onPinned()` -> `onParticipantPinned(participant: DyteRemoteParticipant)` + - `onUnpinned()` -> `onParticipantUnpinned(participant: DyteRemoteParticipant)` + +**Migration Instructions**: + +- Ensure that local user-related changes are handled using `DyteSelfEventsListener` instead of `DyteParticipantsEventListener` +- Update the callback signatures wherever `DyteParticipantsEventListener` is implemented + +#### 4. DyteStage APIs (meeting.stage) + +- Stage Host Methods: + - Removed methods `grantAccessAll()` and `denyAccessAll()` + - `grantAccess()`, `denyAccess()`, and `kick()` now take a list of user IDs, making them more flexible +- Removed unused `REJECTED_TO_JOIN_STAGE` constant from `StageStatus` enum +- Removed the `DyteStageStatus` typealias +- DyteStageEventListener: Callbacks now consistently use the term '*stage*' to align with the **DyteStage** module for better clarity + - Redundant peer callbacks have been removed to simplify the API. Those events can be inferred as per use-case by + `onPeerStageStatusUpdated(participant: DyteRemoteParticipant, oldStatus: StageStatus, newStatus: StageStatus)` + - `onPresentRequestReceived()` -> `onStageAccessRequestAccepted()` + - `onStageStatusUpdated(stageStatus: DyteStageStatus)` -> `onStageStatusUpdated(oldStatus: StageStatus, newStatus: StageStatus)` + - `onPresentRequestAdded(participant: DyteJoinedMeetingParticipant)` -> `onNewStageAccessRequest(participant: DyteRemoteParticipant)` + - `onStageRequestsUpdated(accessRequests: List)` -> `onStageAccessRequestsUpdated(accessRequests: List)` + - Removed `onAddedToStage()`, it was called when localUser successfully joined the stage, the name didn’t match the scenario + +**Migration Instructions**: + +- Update the method calls for granting, denying, and kicking stage participants to use lists of user IDs +- Replace removed/renamed callbacks in `DyteStageEventListener` with the new ones + +#### 5. DytePolls APIs (meeting.polls) + +- Renamed Classes and Properties + - `DytePollMessage` -> `DytePoll` + - `DytePollEventsListener` -> `DytePollsEventListener` + - `DytePolls.messages` -> `DytePolls.items` +- `DytePollsEventListener` changes: + - `onPollUpdates(pollMessages: List)` -> `onPollUpdates(pollItems: List)` + +#### 6. DyteRecording APIs (meeting.recording) + +- Removed following error callbacks from `DyteRecordingEventsListener` as `DyteRecording` methods now return proper errors: + - `onMeetingRecordingStopError()`, `onMeetingRecordingPauseError()`, `onMeetingRecordingResumeError()` +- `onMeetingRecordingStarted()`, `onMeetingRecordingEnded()`, and `onMeetingRecordingStateUpdated()` have been merged into a single callback: +`onRecordingStateChanged(oldState: DyteRecordingState, newState: DyteRecordingState)`. + +**Migration Instructions** + +- Remove any references to the deleted error callbacks in your code. Move error handling code to the `onResult` lambda of the recording methods. +- Replace the separate recording state callbacks with the new unified `onRecordingStateChanged` callback. + +#### 7. DyteLivestream APIs (meeting.livestream) + +- Changed the term "LiveStream" to "Livestream" throughout the SDK + - `meeting.liveStream` -> `meeting.livestream` + - `DyteLiveStream` -> `DyteLivestream` +- Simplified `LivestreamState` enum to align with the Web SDK + - **Old States**: `NONE`, `STARTING`, `STARTED`, `STOPPING`, `STOPPED`, `ERRORED` + - **New States**: `IDLE`, `STARTING`, `STREAMING`, `STOPPING` +- `DyteLivestream.liveStreamUrl` -> `DyteLivestream.playbackUrl` +- Changes in `DyteLivestreamEventsListener`: + - The `DyteLiveStreamEventsListener` has been renamed to `DyteLivestreamEventListener` + - `onLiveStreamStarting`, `onLiveStreamStarted`, `onLiveStreamEnding`, and `onLiveStreamEnded` have been consolidated into + `onLivestreamStateChanged(oldState: LivestreamState, newState: LivestreamState)` + - `onLiveStreamErrored()` -> `onLivestreamError(message: String)` + - `onLiveStreamStateUpdate(data: DyteLivestreamData)` ->  `onLivestreamUpdate(data: DyteLivestreamData)` + - Removed `onStageCountUpdated(count: Int)` + +**Migration Instructions** + +- Update all class and property references to replace "LiveStream" with "Livestream" +- Use the new `LivestreamState` enum values, replacing old state with the new, simplified states +- Update callbacks in `DyteLivestreamEventListener` to the new versions, ensuring state changes are handled using `onLivestreamStateChanged` and other revised methods \ No newline at end of file diff --git a/docs/android-core/upgrade-v2/_category_.json b/docs/android-core/upgrade-v2/_category_.json new file mode 100644 index 000000000..85fd7d870 --- /dev/null +++ b/docs/android-core/upgrade-v2/_category_.json @@ -0,0 +1,5 @@ +{ + "position": 2, + "label": "2.x Upgrade Guide", + "collapsible": true +} diff --git a/docs/ios-core/Introduction.mdx b/docs/ios-core/Introduction.mdx index f9ca8a560..c48a82e44 100644 --- a/docs/ios-core/Introduction.mdx +++ b/docs/ios-core/Introduction.mdx @@ -1,6 +1,6 @@ --- title: Introduction -sidebar_position: 3 +sidebar_position: 4 sidebar_class_name: module-seperation --- diff --git a/docs/ios-core/pre-call/_category_.json b/docs/ios-core/pre-call/_category_.json index 5539de8b0..c37e3a93b 100644 --- a/docs/ios-core/pre-call/_category_.json +++ b/docs/ios-core/pre-call/_category_.json @@ -1,5 +1,5 @@ { - "position": 2, + "position": 3, "label": "Pre-call", "collapsible": true, "className": "pre-call-docs" diff --git a/docs/ios-core/quickstart.mdx b/docs/ios-core/quickstart.mdx index 7a0de3504..6c1c2e96c 100644 --- a/docs/ios-core/quickstart.mdx +++ b/docs/ios-core/quickstart.mdx @@ -4,7 +4,7 @@ tags: - quickstart - setup slug: / -sidebar_position: 1 +sidebar_position: 2 --- import Tabs from '@theme/Tabs'; diff --git a/docs/ios-core/upgrade-v2/1-introduction.mdx b/docs/ios-core/upgrade-v2/1-introduction.mdx new file mode 100644 index 000000000..f75a532be --- /dev/null +++ b/docs/ios-core/upgrade-v2/1-introduction.mdx @@ -0,0 +1,68 @@ +--- +title: Introduction +sidebar_position: 1 +tags: + - iOS-core + - v2 +--- + +With the v2 release of the Dyte Core SDK, we're introducing a major upgrade focused on making the development experience simpler, more consistent, and intuitive. This upgrade introduces breaking changes across four key areas: + +### 1. Migration to V2 REST API Terminology + +- `meeting.meta.roomName` -> `meeting.meta.meetingId` +- `DyteMeetingParticipant.clientSpecificId` -> `DyteMeetingParticipant.customParticipantId` +- Removed `DyteMeetingInfo` (V1) + + +### 2. Removal of Deprecated APIs + +We have removed deprecated methods and properties in favour of improved, uniform, and clearer versions. + +- Removed `DyteParticipants.screenshares` (use `DyteParticipants.screenShares`). The deprecated type `DyteScreenShareMeetingParticipant` has also been removed +- **Chat Methods**: Removed deprecated file and image send methods. The new closure-based methods take `NSURL`s & return proper errors + - File message methods: + - Removed: + - `sendFileMessage(filePath: String)` + - `sendFileMessage(filePath: String, fileName: String)` + - `sendFileMessage(fileUri: NSURL)` + - Use instead: + - `sendFileMessage(fileURL: NSURL, onResult: (ChatFileError?) -> Void)` + - Removed: + - `sendFileMessage(filePath: String, peerIds: [String])` + - `sendFileMessage(fileUri: NSURL, peerIds: [String])` + - Use instead: + - `sendFileMessage(fileURL: NSURL, peerIds: [String], onResult: (ChatFileError?) -> Void)` + - Image message methods: + - Removed: + - `sendImageMessage(filePath: String, fileName: String)` + - `sendImageMessage(imageUri: NSURL)` + - `sendImageMessage(imagePath: String)` + - Use instead: + - `sendImageMessage(imageURL: NSURL, onResult: (ChatFileError?) -> Void)` + - Removed: + - `sendImageMessage(imagePath: String, peerIds: [String])` + - `sendImageMessage(imageUri: NSURL, peerIds: [String])` + - `sendImageMessage(filePath: String, fileName: String, peerIds: [String])` + - Use instead: + - `sendImageMessage(imageURL: NSURL, peerIds: [String], onResult: (ChatFileError?) -> Void)` +- Removed deprecated listener callbacks: + - `DyteSelfEventsListener.onStageStatusUpdated`. Use `DyteStageEventListener.onStageStatusUpdated()` + - `DyteStageEventListener.onPresentRequestAccepted(participant: DyteJoinedMeetingParticipant)` + - `DyteMeetingRoomEventsListener.onActiveTabUpdate(id: String, tabType: ActiveTabType)`. + Use `DyteMeetingRoomEventsListener.onActiveTabUpdate(meeting: DyteMobileClient, activeTab: ActiveTab)` + + +### 3. Revamped Error Handling + +- Errors are categorised by modules, such as `ChatError`, `SelfError`, and `MeetingError` +- All public APIs provide proper errors and additional error data where applicable for better debugging +- Uses enums for error codes, making it easier to handle specific cases + + +### 4. API Structural Changes + +We made a few direct breaking changes in our APIs to simplify the types, make methods more intuitive and ensure uniformity across platforms.  +For example, `DyteMeetingParticipant` has been restructured to align with real-world entities. + +Learn more about the direct breaking changes and migration instructions on the next page. \ No newline at end of file diff --git a/docs/ios-core/upgrade-v2/2-breaking-changes-migration.mdx b/docs/ios-core/upgrade-v2/2-breaking-changes-migration.mdx new file mode 100644 index 000000000..43f0b566a --- /dev/null +++ b/docs/ios-core/upgrade-v2/2-breaking-changes-migration.mdx @@ -0,0 +1,186 @@ +--- +title: Breaking Changes and Migration Guide +sidebar_position: 2 +tags: + - iOS-core + - v2 +--- + +This section provides details about the additional breaking changes made in Dyte Core SDK v2 and provides migration guidance. +The changes span multiple modules, mainly simplifying the APIs or renaming them to ensure uniformity across the platforms. + + +### Changes in Participant Hierarchy and Simplified Types + +The participant hierarchy has been simplified to align better with real-world entities: + +- **Old Structure**: + - `DyteMeetingParticipant` was the parent class with direct subtypes: + - `DyteJoinedMeetingParticipant` + - `DyteWaitlistedParticipant` + - `DyteJoinedMeetingParticipant` had two subtypes: + - `DyteScreenShareMeetingParticipant` + - `DyteSelfParticipant` (local user) + +- **New Structure**: + - `DyteMeetingParticipant` still represents a participant in a meeting which is simply either: + - `DyteSelfParticipant` (local user) or + - `DyteRemoteParticipant` (other participants in the meeting) + +- Moved methods for managing waiting room requests to `DyteParticipants`: + - `DyteWaitlistedParticipant.acceptWaitListedRequest()` -> `DyteParticipants.acceptWaitingRoomRequest(id)` + - `DyteWaitlistedParticipant.rejectWaitListedRequest()` -> `DyteParticipants.rejectWaitingRoomRequest(id)` + +The old participant hierarchy was complex, with certain types representing temporary states or behaviour at runtime. +The new structure simplifies this by clearly differentiating between the local user and remote participants. + +**Migration Instructions**: + +- Replace instances of `DyteJoinedMeetingParticipant` with `DyteRemoteParticipant`. +- Replace any usage of `DyteScreenShareMeetingParticipant` with `DyteMeetingParticipant` or its subtype. +- `DyteSelfParticipant` is now a direct subtype of `DyteMeetingParticipant`. +- Update the Waiting Room management logic to use APIs from `DyteParticipants` for accepting/rejecting waiting room requests. + + +### Changes in DyteMeetingRoomEventsListener Connection State Callbacks + +The following connection state callbacks have been removed: + +- `onMeetingRoomDisconnected`, `onConnectingToMeetingRoom`, `onConnectedToMeetingRoom`, +`onDisconnectedFromMeetingRoom`, `onMeetingRoomConnectionFailed`, `onReconnectingToMeetingRoom`, +`onReconnectedToMeetingRoom`, `onMeetingRoomReconnectionFailed` + +These callbacks have been consolidated into a single unified callback: +`onSocketConnectionUpdate(newState: SocketConnectionState)` + +**Migration Instructions**: + +- Move all connection state handling, mainly reconnection logic from the old callbacks to `onSocketConnectionUpdate()`. +The new callback provides a `SocketConnectionState` parameter that represents the current state of the meeting connection. + + +`DyteMeetingInfoV2.baseUrl` has been renamed to `DyteMeetingInfoV2.baseDomain`. This change is applicable only if you +are using a white-labeled domain. In normal cases, now you just need to pass `authToken`, `enableAudio` & `enableVideo`. + + +### Other Breaking Changes module-wise + +#### 1. DyteMobileClient (meeting) + +- The following methods now return `MeetingError` in the `onFailure` callback instead of `DyteError`: + - `init()`, `leaveRoom()`, `release()` +- Renamed some methods for adding/removing listeners to align with the respective listener names: + - `addParticipantEventsListener()` -> `addParticipantsEventListener()` + - `addPollsEventsListener()` -> `addPollsEventListener()` + - `addStageEventsListener()` -> `addStageEventListener()` + - `addLivestreamEventListener()` -> `addLivestreamEventListener()` +- Changes in `DyteMeetingRoomEventsListener` callbacks: + - Failure callbacks now return standardised `MeetingError` instead of `Exception`: + - `onMeetingInitFailed(exception: KotlinException)` -> `onMeetingInitFailed(error: MeetingError)` + - `onMeetingRoomJoinFailed(exception: KotlinException)` -> `onMeetingRoomJoinFailed(error: MeetingError)` + - Relevant callback methods now include `DyteMobileClient` as a parameter, making it easier to access meeting object + - `onMeetingInitCompleted()` -> `onMeetingInitCompleted(meeting: DyteMobileClient)` + - `onMeetingRoomJoinCompleted()` -> `onMeetingRoomJoinCompleted(meeting: DyteMobileClient)` + - `onActiveTabUpdate(activeTab: ActiveTab)` -> `onActiveTabUpdate(meeting: DyteMobileClient, activeTab: ActiveTab)` + +#### 2. DyteSelfParticipant (meeting.localUser) + +- Renamed the following screen share methods to make the name casing of "ScreenShare" uniform with the rest of the SDK: + - `enableScreenshare()` -> `enableScreenShare()` + - `disableScreenshare()` -> `disableScreenShare()` +- Merged `onScreenShareStarted` & `onScreenShareStopped` into a single callback: +`onScreenShareUpdate(isEnabled: Bool)` +- Moved `onRoomMessage()` callback from `DyteSelfEventsListener` to `DyteParticipantsEventListener` and renamed it to `onNewBroadcastMessage()` +- Removed the unused `onProximityChanged(isNear: Bool)` + +**Migration Instructions**: + +- Update enable/disable screen share method names +- Replace the old screen share callbacks with the new `onScreenShareUpdate()` callback +- Move the broadcast message handling logic to `DyteParticipantsEventListener.onNewBroadcastMessage()` callback + +#### 3. DyteParticipants (meeting.participants) + +- Renamed `DyteRoomParticipants` to `DyteParticipants` for uniformity across the platforms +- `meeting.participants` now contains data only related to remote participants, excluding the local user +- Changes in `DyteParticipantsEventListener` callbacks: + - Callbacks are now given only for remote participant events. Local user changes are dispatched to `DyteSelfEventsListener` + - Listener renamed from `DyteParticipantEventsListener` to `DyteParticipantsEventListener` + - Merged `onScreenShareStarted` & `onScreenShareEnded` into a single callback: + `onScreenShareUpdate(participant: DyteRemoteParticipant, isEnabled: Bool)` + - Removed `onNoActiveSpeaker()`. Now `onActiveSpeakerChanged(participant: DyteRemoteParticipant?)` gets a null value when active participant is cleared + - Removed unused, uncalled `onScreenSharesUpdated()`, `onSetAsActiveSpeaker()`, & `onRemovedAsActiveSpeaker()` + - Following callbacks have been tweaked for consistency & clarity: + - `onAudioUpdate(audioEnabled: Bool, participant: DyteMeetingParticipant)` -> `onAudioUpdate(participant: DyteRemoteParticipant, isEnabled: Bool)` + - `onVideoUpdate(videoEnabled: Bool, participant: DyteMeetingParticipant)` -> `onVideoUpdate(participant: DyteRemoteParticipant, isEnabled: Bool)` + - `onPinned()` -> `onParticipantPinned(participant: DyteRemoteParticipant)` + - `onUnpinned()` -> `onParticipantUnpinned(participant: DyteRemoteParticipant)` + +**Migration Instructions**: + +- Ensure that local user-related changes are handled using `DyteSelfEventsListener` instead of `DyteParticipantsEventListener` +- Update the callback signatures wherever `DyteParticipantsEventListener` is implemented + +#### 4. DyteStage APIs (meeting.stage) + +- Stage Host Methods: + - Removed methods `grantAccessAll()` and `denyAccessAll()` + - `grantAccess()`, `denyAccess()`, and `kick()` now take a list of user IDs, making them more flexible +- Removed unused `.rejectedToJoinStage` constant from `StageStatus` enum +- DyteStageEventListener: Callbacks now consistently use the term '*stage*' to align with the **DyteStage** module for better clarity + - Redundant peer callbacks have been removed to simplify the API. Those events can be inferred as per use-case by + `onPeerStageStatusUpdated(participant: DyteRemoteParticipant, oldStatus: StageStatus, newStatus: StageStatus)` + - `onPresentRequestReceived()` -> `onStageAccessRequestAccepted()` + - `onStageStatusUpdated(stageStatus: DyteStageStatus)` -> `onStageStatusUpdated(oldStatus: StageStatus, newStatus: StageStatus)` + - `onPresentRequestAdded(participant: DyteJoinedMeetingParticipant)` -> `onNewStageAccessRequest(participant: DyteRemoteParticipant)` + - `onStageRequestsUpdated(accessRequests: [DyteJoinedMeetingParticipant])` -> `onStageAccessRequestsUpdated(accessRequests: [DyteRemoteParticipant])` + - Removed `onAddedToStage()`, it was called when localUser successfully joined the stage, the name didn’t match the scenario + +**Migration Instructions**: + +- Update the method calls for granting, denying, and kicking stage participants to use lists of user IDs +- Replace removed/renamed callbacks in `DyteStageEventListener` with the new ones + +#### 5. DytePolls APIs (meeting.polls) + +- Renamed Classes and Properties + - `DytePollMessage` -> `DytePoll` + - `DytePollEventsListener` -> `DytePollsEventListener` + - `DytePolls.messages` -> `DytePolls.items` +- `DytePollsEventListener` changes: + - `onPollUpdates(pollMessages: [DytePoll])` -> `onPollUpdates(pollItems: [DytePoll])` + +#### 6. DyteRecording APIs (meeting.recording) + +- Removed following error callbacks from `DyteRecordingEventsListener` as `DyteRecording` methods now return proper errors: + - `onMeetingRecordingStopError()`, `onMeetingRecordingPauseError()`, `onMeetingRecordingResumeError()` +- `onMeetingRecordingStarted()`, `onMeetingRecordingEnded()`, and `onMeetingRecordingStateUpdated()` have been merged into a single callback: +`onRecordingStateChanged(oldState: DyteRecordingState, newState: DyteRecordingState)`. + +**Migration Instructions** + +- Remove any references to the deleted error callbacks in your code. Move error handling code to the `onResult` lambda of the recording methods. +- Replace the separate recording state callbacks with the new unified `onRecordingStateChanged` callback. + +#### 7. DyteLivestream APIs (meeting.livestream) + +- Changed the term "LiveStream" to "Livestream" throughout the SDK + - `meeting.liveStream` -> `meeting.livestream` + - `DyteLiveStream` -> `DyteLivestream` +- Simplified `LivestreamState` enum to align with the Web SDK + - **Old States**: `.none`, `.starting`, `.started`, `.stopping`, `.stopped`, `.errored` + - **New States**: `.idle`, `.starting`, `.streaming`, `.stopping` +- `DyteLivestream.liveStreamUrl` -> `DyteLivestream.playbackUrl` +- Changes in `DyteLivestreamEventsListener`: + - The `DyteLiveStreamEventsListener` has been renamed to `DyteLivestreamEventListener` + - `onLiveStreamStarting`, `onLiveStreamStarted`, `onLiveStreamEnding`, and `onLiveStreamEnded` have been consolidated into + `onLivestreamStateChanged(oldState: LivestreamState, newState: LivestreamState)` + - `onLiveStreamErrored()` -> `onLivestreamError(message: String)` + - `onLiveStreamStateUpdate(data: DyteLivestreamData)` ->  `onLivestreamUpdate(data: DyteLivestreamData)` + - Removed `onStageCountUpdated(count: Int)` + +**Migration Instructions** + +- Update all class and property references to replace "LiveStream" with "Livestream" +- Use the new `LivestreamState` enum values, replacing old state with the new, simplified states +- Update callbacks in `DyteLivestreamEventListener` to the new versions, ensuring state changes are handled using `onLivestreamStateChanged` and other revised methods \ No newline at end of file diff --git a/docs/ios-core/upgrade-v2/_category_.json b/docs/ios-core/upgrade-v2/_category_.json new file mode 100644 index 000000000..85fd7d870 --- /dev/null +++ b/docs/ios-core/upgrade-v2/_category_.json @@ -0,0 +1,5 @@ +{ + "position": 2, + "label": "2.x Upgrade Guide", + "collapsible": true +} diff --git a/docusaurus.config.js b/docusaurus.config.js index f0ffd4ec3..85dcd1407 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -106,7 +106,7 @@ const docs = [ routeBasePath: '/android-core', versions: { current: { - label: '1.x.x', + label: '2.x.x', }, }, }, @@ -126,7 +126,7 @@ const docs = [ routeBasePath: '/ios-core', versions: { current: { - label: '1.x.x', + label: '2.x.x', }, }, },