twilio / twilio-video-ios

Programmable Video SDK by Twilio
http://twilio.com/video
Other
64 stars 22 forks source link

iOS - didSubscribeToDataTrack isn't triggered. #254

Open VermontAlex opened 1 year ago

VermontAlex commented 1 year ago

Hello.

I have an issue which i will describe with scenario:

Description

Host - creator of the room, iOS side. Participant - somebody who joins to the room, Web side.

Host creates the room and the call starts. The internet connection is lost on the Host side for 5-10 seconds. At the same moment, while internet connection is still missing on the Host side, Participant starts joining to the meeting, it can take a few seconds to connect Participant to the room. Then the internet connection is restored on the Host side, so that the method 'roomDidReconnect' is called but 'roomDidDisconnect' is not on the Host side. After 'roomDidReconnect' is called, Participant joins to the room and method 'participantDidConnect' is called on the Host side.

Expected Behavior

After method 'participantDidConnect' i expect that the method 'didSubscribeToDataTrack(dataTrack: RemoteDataTrack, publication: RemoteDataTrackPublication, participant: RemoteParticipant)' should be triggered, to do 'dataTrack.delegate = self' for work with DataTracks after that. In the end, i expect 'remoteDataTrackDidReceiveString' be triggered when 'RemoteDataTrack' is sent from Web.

Actual Behavior

'didSubscribeToDataTrack' isn't triggered so i can't assign 'dataTracks.delegate = self' and work with dataTraks when they are sent from the Web.

Steps to Reproduce

  1. Host creates the room and starts the call.
  2. Participant starts joining to the call.
  3. When Participant starts joining to the call but is not joined yet, Host loses internet connection.
  4. Host is reconnecting.
  5. Host restored internet connection and is back to the room.
  6. From iOS side we receive 'participantDidConnect'.
  7. Participant joins to the call.
  8. 'didSubscribeToDataTrack' method is not called on iOS side.
  9. 'remoteDataTrackDidReceiveString' method is not called when RemoteDataTrack is sent from Web.

Code

1) Called when Participant joined to the call. func participantDidConnect(room: Room, participant: RemoteParticipant) { participant.delegate = self }

2) Expected to be called. func didSubscribeToDataTrack(dataTrack: RemoteDataTrack, publication: RemoteDataTrackPublication, participant: RemoteParticipant) { dataTrack.delegate = self }

Reproduces How Often

Each time from the flow described.

Video iOS SDK

'TwilioVideo', '5.5.0' 'TwilioConversationsClient', '2.2.5'

Xcode

Xcode 14.1

iOS Version

iOS 16.2

iOS Device

iPad Pro 11

ramapal commented 1 year ago

Hello @VermontAlex,

We could not reproduce this issue with the latest version of the iOS SDK. Can you update to the latest version and try it?