Video Twilio - Setting up a Ringtone for videocalls - twilio

We're using Twilio Programmable Video and we'd like to set up:
- A ringtone while a participant is waiting in the room.
- A "ringing" to notify the other side that a participant is waiting in the room.
All in all, a performance like a voice call.
We have checked API Reference, AudioTrack and Media section, without success. (https://media.twiliocdn.com/sdk/js/video/releases/1.0.0-beta4/docs/)
Any idea to configure this performance?
Regards,
Carlos

Twilio developer evangelist here.
There is no functionality in the Twilio API for providing a ring tone, however you could implement it yourself.
You would need to send an invite to the participant that hasn't entered the room yet. You could do that with a server sent event or websocket. Then you would play the ringtone (using an <audio> element or the web audio API) until the user entered the room themself, at which point you would stop playback of the ringtone.
Let me know if that helps at all.

Related

Twilio Video JS: Muting RemoteParticipant's audio

I have a scenario wherein I would need to mute some of the remote participants in the video call in my local machine. Example of this use case is when I want to be able to just hear a remote participant that is presenting and no else.
Solution I found online is to muted as stated here: https://github.com/twilio/twilio-video.js/issues/363.
Muting the html element appears to work but I'm just curious if there is a Twilio method that can achieve the same result?
At this time, the SDK does not provide a native ability to mute remote tracks. Only the local participant can disable their own tracks.
A solution to this problem is the track subscription API. This API allows you to make a request to update a certain participant's subscribe rules so you can programmatically unsubscribe users from tracks. For your use case, you can could hit this API to unsubscribe participants from specific users in the room, or unsubscribe all participants from all tracks except the presenter.
More info on this can be found here: https://www.twilio.com/docs/video/api/track-subscriptions
Let me know what you think!

How to check if remote participant disabled video (Twilio Programmable Video)

I've created peer to peer video chat using Twilio Programmable Video. I want to check if remote participant disabled video track and show avatar of that user for local participant in this case. How can I do it? Is there some event I can subscribe to know it?
Twilio developer evangelist here.
You are looking for the RemoteParticipant's trackUnpublished event.
trackDisabled event allows to check if remote participant disabled video

Can we connect dial into Twilio Programmable Video Group Rooms?

It seems Twilio Programmable Video API is based on WebRTC. This will allow us to setup audio/video conference from browser/app to browser/app.
However, is there any way to connect Programmable Voice incoming audio calls to the Video rooms? Also is there any way to make outgoing Voice calls from the Rooms?
This will allow a participant to just dial-in even if his internet is not working.
Twilio developer evangelist here.
It is not currently possible, using the Video SDK, to dial into a Video Group Room from an audio call over the phone network. If that changes I will update this answer.

How does Twilio's "Programmable Video" work?

I'm building a streaming iOS app in Swift. Looking at the docs https://www.twilio.com/docs/api/video I understand that you can create live video chat rooms on the fly.
My use case is a bit different:
User A access a room, hit 'record' and start streaming a video of himself to Twilio storage. Creates a thumbnail in the UI. User B enters the same room and click the video thumbnail - that video should be streamed down to User B.
If user A is talking (Streaming up) and user B is in the room at the same time, it should be possible to 'Go live', which would start a live video chat room that other users can join too.
Main question: Does Twilio Programmable Video allow streaming up and down using their storage?
Secondary question: Would you say Twilio Programmable Video is the right choice for this use case or would you recommend another service?
Twilio developer evangelist here.
I'll answer this the other way around that you asked if that's ok.
If User A is currently streaming to a room and recording it (having created the room in group mode with RecordParticipantsOnConnect set to true) and another user wants to join the room, then they can. They just need an access token that gives them access to the room. They will then be able to join the room and chat and be recorded too.
Once a recording is complete, you will receive a webhook to the statusCallback URL that was set for the room. The callback for the recording will have the recording-complete and will include a MediaURL for the recording as well as the Uri and Sid for the recording resource.
You can use the media URL or the recording resource to get the binary data, which for videos will be in .mkv format. If you want to stream this video to your users, you may want to download the video and convert to a playable format. Or upload it to a streaming service.
Let me know if that helps at all.

Twilio: Mute a participant in a conference

I'm building a mobile voice conference application using Twilio SDK.
I need to implement a mute button so a user could temporary block an incoming voice track of a specific participant. But other users in a conference should be able to hear the muted user ofc. Just like a mute button in the Skype.
Yet I have no luck in finding a solution. Is it possible to do?

Resources