Closed dharam-step closed 7 months ago
Hi @dharam-step
I think this is because the SDK pauses and resumes the video based on the network conditions.
For IOS you can add new 2 events for pause and resume (here it is KEventonOnPauseVideoTile
and KEventOnResumeVideoTile
) and test it with the below observer functions ,
//For Pause
- (void)videoTileDidPauseWithTileState:(VideoTileState * _Nonnull)tileState
{
// Not implemented for demo purposes
[_bridge sendEventWithName:KEventonOnPauseVideoTile body:@{@"tileId":[NSNumber numberWithInt: (int)tileState.tileId],
@"attendeeId":[tileState attendeeId], @"isLocal":@(tileState.isLocalTile), @"isScreenShare":@(tileState.isContent),@"pauseState":@(tileState.pauseState)}];
}
// For Resume
- (void)videoTileDidResumeWithTileState:(VideoTileState * _Nonnull)tileState
{
// Not implemented for demo purposes
[_bridge sendEventWithName: KEventOnResumeVideoTile body:@{@"tileId":[NSNumber numberWithInt: (int)tileState.tileId],
@"attendeeId":[tileState attendeeId], @"isLocal":@(tileState.isLocalTile), @"isScreenShare":@(tileState.isContent), @"pauseState":@(tileState.pauseState)}];
}
https://aws.github.io/amazon-chime-sdk-android/amazon-chime-sdk/com.amazonaws.services.chime.sdk.meetings.audiovideo.video/-video-pause-state/index.html
the above link explain the pauseState
pause:--
override fun onVideoTilePaused(tileState: VideoTileState) {
// Not implemented for demo purposes
logger.info(TAG, "Received event for VideoTilePaused: $tileState")
eventEmitter.sendVideoTileEvent(RN_EVENT_VIDEO_TILE_PAUSED, tileState)
}
Resume:---
override fun onVideoTileResumed(tileState: VideoTileState) {
// Not implemented for demo purposes
logger.info(TAG, "Received event for VideoTileResumed: $tileState")
eventEmitter.sendVideoTileEvent(RN_EVENT_VIDEO_TILE_RESUME, tileState)
}
You can test the pause state in the react native side with pauseState value if the pause is due to poor network conditions the pauseState value ==2 ,
in react native side
const OnPauseVideoTileSubscription = getSDKEventEmitter().addListener(MobileSDKEvent.OnPauseVideoTile, (tileState) => {
console.log("OnPauseVideoTileSubscription=", tileState)
if (tileState.pauseState == 2) {
console.log("Video was paused due to a poor network connection")
}
})
you can pause and resume video tiles based on the active page to reduce network issue
iOS:----
RCT_EXPORT_METHOD(setPauseTile:(NSNumber * _Nonnull)tileId) {
[meetingSession.audioVideo pauseRemoteVideoTileWithTileId:[tileId integerValue]];
}
RCT_EXPORT_METHOD(setResumeTile:(NSNumber * _Nonnull)tileId) {
[meetingSession.audioVideo resumeRemoteVideoTileWithTileId:[tileId integerValue]];
}
android:------
@ReactMethod
fun setPauseTile(tileId: Int) {
logger.info(TAG, "setPauseTile: $tileId")
meetingSession?.run {
audioVideo.pauseRemoteVideoTile(tileId)
}
}
@ReactMethod
fun setResumeTile(tileId: Int) {
logger.info(TAG, "setResumeTile: $tileId")
meetingSession?.run {
audioVideo.resumeRemoteVideoTile(tileId)
}
}
Video Conferencing Bug
Description: We are encountering issues with our video conferencing implementation using AWS Chime. The conferencing system involves two roles: Instructor and Student. When the instructor turns on their video, the video sometimes gets stuck on the student's screen and vice-versa. Additionally, when we paginate the video tiles using the React Native Swiper component, the video tiles sometimes disappear randomly.
Steps to Reproduce:
Expected Behavior:
Actual Behavior:
Component to render students wth swiper:
RNVideoRenderView Component:
Environment:
This issue impacts the overall usability of our video conferencing feature. We appreciate your prompt attention to this matter.