let connectOptions = ConnectOptions(token: accessToken) { (builder) in
builder.roomName = "my-room"
if let audioTrack = localAudioTrack {
builder.audioTracks = [ audioTrack ]
}
if let dataTrack = localDataTrack {
builder.dataTracks = [ dataTrack ]
}
if let videoTrack = localVideoTrack {
builder.videoTracks = [ videoTrack ]
}
}
var room = TwilioVideoSDK.connect(options: connectOptions, delegate: self)
I want to connect to room first, then I will create and assign local tracks later. I didn't find any method to do it. Can I add local tracks after room is connected? how to do it?
@hungbv Yes, you can connect to a Room with no tracks, and publish them later. Also our APIs allow you to publish/unpublishing tracks once you are connected to a Room.
See this code for example.
Hi everyone, I'm new to Twilio. I'm following document: https://www.twilio.com/docs/video/ios-getting-started I see that local media track must be created before connect to room:
I want to connect to room first, then I will create and assign local tracks later. I didn't find any method to do it. Can I add local tracks after room is connected? how to do it?