Andy
Andy

Reputation: 541

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?

Upvotes: 3

Views: 1037

Answers (1)

philnash
philnash

Reputation: 73065

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.

Upvotes: 3

Related Questions