I have a simple dataTrack for twilio-video
let dataTrack = new LocalDataTrack()
const tracks = track.concat(dataTrack)
room = await connectToRoom(roomConnectId, tracks)
....
function closeRoom() {
dataTrack.send(JSON.stringify('disconnected'))
}
How can I make sure this message is sent and recieved? Can I wrap it in a loop that keeps trying until it works? Are there any other options I can add to it to make it work?
I need the receiver to get this message 100%. Is that possible?