Closed sureshmopidevi closed 4 years ago
@sureshmopidevi,
Looking at the RoomDelegate
code you pasted, there is an error with this line:
func roomDidReconnect(room: Room) {
print("Reconnected to room \(room.name)"
}
And that appears to be bleeding into the following two definitions. I'm not sure if that is how it is in your actual file of if that was just a typo in the Git issue. If it is is your actual file, that might be why the following two delegate methods are not being invoked.
Ryan
@paynerc it's a typo in git issue.
@sureshmopidevi,
OK. I wasn't sure how that would have even compiled otherwise. So if I am correct in understanding what you are seeing...
roomDidConnect()
is called.participantDidConnect()
was never called.participantDidDisconnect()
was never called.roomDidDisconnect()
was called?What is TwilioController
? What is the lifetime of this object? From a look at the implementations listed above, it would seem like these delegates should be getting called. Room.delegate
and RemoteParticipant.delegate
maintains a weak references to the object passed in. I am wondering if the TwilioConroller
object is instantiated and passed in to the TwilioVideoSDK.connect()
method, and eventually goes out of scope and is deallocated if nothing else is holding a strong reference to it. I am not sure if this is what is happening here, but without seeing the actual code, it is a possibility.
Also, do you have any debug level log files that I could look at?
If you don't feel comfortable publicly sharing code or log files, you can open a Twilio support ticket by emailing support@twilio.com
and mention that I asked you to send information, and include this GitHub issue and it should get routed to me.
Ryan
@paynerc I have workaround and i assumed that data track causing the issue.
func setupConnectionOptions(roomName: String, token: String) -> ConnectOptions {
return ConnectOptions(token: token) { builder in
if let videoTrack = self.localVideoTrack {
builder.videoTracks = [videoTrack]
}
if let audioTrack = self.localAudioTrack {
builder.audioTracks = [audioTrack]
}
if let dataTask = self.localDataTrack {
builder.dataTracks = [dataTask]
}
builder.roomName = roomName
}
}
Data track was assigning to builder by null check. but when i have the following ⬇️ code, video/audio unsubscribing and participant disconnection was not calling.
if let dataTask = self.localDataTrack {
builder.dataTracks = [dataTask]
}
After removing data track from connection options. i was abled to get audio/video unpublishing and participant disconnection call.
Lets say we have 2 users A
From web and B
from iOS
If A
end call , participantDidDisconnects
calls on B
side , and i am disconnecting room.
When B
ends call. I was calling
room?.disconnect()
Room was successfully disconnected for B
but call was never ending at A
.
@sureshmopidevi,
That sounds like a potentially serious issue if it is happening repeatedly for you. I would like to see the debug level logs for the run where publishing the data track in the connect options is then causing you further issues as well as the code using to create your data track. I would really like to be able to reproduce the issue that you are seeing. At minimum a Room SID would be helpful so I can do some further investigating.
As far as your second question, you are saying that after calling room.disconnect()
on iOS, you receive the roomDidDisconnect()
event on iOS, but the JS SDK is not receiving the participantDisconnected
event?
Ryan
@paynerc We are not using REST API to create rooms, instead we are adding VideoGrant to a dynamic room name by following below guide https://www.twilio.com/docs/video/tutorials/user-identity-access-tokens#javascript So will there be a RoomSid in this case also?
Yes, absolutely. When you connect to a room the Room SID is provided back in the Room object. You can log this out in your roomDidConnect()
callback.
func roomDidConnect(room: Room) {
room.remoteParticipants.forEach({$0.delegate = self})
print("Connected to room \(room.name), Room Sid = \(room.sid)")
}
If you can reproduce the issue where the data tracks in the connect options is causing issues, please at minimum send a Room SID. As I said, debug level logs would be the most helpful but I understand you may not wish to attach them to this public GitHub issue. As I mentioned before, you can send them to support@twilio.com, reference me and this issue and let me know here that you sent them and I will find the support issue.
Thank you,
Ryan
@paynerc , I have sent an email to support@twilio.com
along with some log files and required information.
Thanks.
Thank you, I will keep my eye out for the support issue and will get back to you as soon as possible.
Thank you,
Ryan
@sureshmopidevi,
I have responded to the support issue. I will move all communications to that medium for the time being and once we come to a resolution I will update this public facing GitHub issue in the case that it may help other developers in the future.
Ryan
Closing this issue as we discussed in the support ticket that the code is actually working as expected and there are no issues in the SDK.
Xcode 11.4.1 Device: iPhone 6s SDK version: 3.2
When i connected to room
roomDidConnect
was calling and getting remote stream data like video, audio.didSubscribeToAudioTrack
,didUnsubscribeFromVideoTrack
were callingparticipantDidConnect
was never calling.When remote user disconnects
participantDidDisconnect
,didUnsubscribeFromVideoTrack
,didSubscribeToAudioTrack
was never calling.Room delegate
Remote Participant delegate
Did i missed something. Please help me to figure out the issue. Thanks.