Is it possible to implement one-to-many WebRTC video room using Twilio Video API? - webrtc

Is it possible to implement one-to-many WebRTC video room using Twilio Video API? One publisher and many subscribers. Webinar.

Do you mean a group room instead of a peer-to-peer room?
This is possible, and they announced in May'17 an increase in the number of users per room up to 50.
In their documentation and tutorials there is an example on how to start a group room and how to configure it. See this link. You can see how to implement it on different languages. :)
EDIT:
So I don't think you can create the room specifying a user id who would be the presenter, and then automatically all others who join would be just spectators.
Now, when joining a room with Video.connect, you can specify options for audio and video, like:
var Video = require('twilio-video');
// Connect to the Room with just audio
Video.connect('my-token', {
name: 'my-room-name',
audio: true
});
You can see more on how to join and the options you can specify here. So you could always wrap this in your code, and force every other viewer to not send video.

philnash answered in the related topic that it's impossible at the moment.

Related

How to retrieve all "audience" users of an interactive audio streaming channel

I am using AgoraWebSDK-NG to do a Web implementation.
My application uses interactive audio streaming. Video is not required.
I want to know how to retrieve all users who are part of the "audience" of a channel (and not "hosts"). I want to display such "audience" users in the UI.
Unfortunately I cannot find any method to be able to do so here https://agoraio-community.github.io/AgoraWebSDK-NG/api/en/interfaces/iagorartcclient.html#getlisteners
Please let me know how this would be possible. An example would be great. If it is not possible, then just let me know that as well. Thank you.
this is not possible at the moment with the NG SDK. To achieve this right now, you can use the Agora RTM SDK.
You can create an RTM channel with the same name as the RTC channel. Then you can use the RTM's channel events to know when an audience member joins or leaves.

Generate composition for p2p video recording on Twilio

I am using twilio to in my app for a peer to peer video chat (using Small Group Room with max 2 participants). I have enabled video recording in my backend so I am able to record and save the videos but the problem occurs when I try to use the compositions API.
Composition API requires video_sources which is an array of video sources that will be used in the composition. Nowhere on the documentation it says how I can set the video source value. I can grab the PARTICIPANT SID and use that but it would be much much easier if I can use a value that is stored in my database. Users are also able to disconnect from the room and connect again so I need to keep track of video sources of a user.
Has anyone came across this issue?
This is a perfect example of what I mean by custom video_source
Link to Twilio Documentation
The compositions API is only supported for Group Rooms.
Comparing Room Types

Twillio Programmable Video

Is it possible with the Programmable Video API from Twilio to build something that resembles the Google Hangouts functionality in terms of how it focuses on the person talking automatically?
I don't see any examples or notes about this in their documentation and the github for this doesn't seem to be frequented that much.
Would appreciate any help, thank you!
Twilio developer evangelist here.
You can build that sort of thing, however it is currently out of scope for the Video SDK itself.
I haven't done this before, but I'd start by looking into analysing the audio coming from each participant in the chat. You can actually create audio sources from an existing <video> or <audio> element. In the case of Twilio Video, each track is created as a separate element, so you want to look for <audio> elements and use them:
var audioElements = document.querySelectorAll('audio');
audioElements.forEach(audio => {
var audioCtx = new AudioContext();
var source = audioCtx.createMediaElementSource(audio);
// create audio analyser, analyse volume in audio
})
You want to use the Web Audio API to then analyse all the remote tracks and work out which is currently making the most noise for a sustained period of time and switch to that one. This blog post may help with the analysis. I've not seen anything that will help with the selection, but hopefully you can work it out from there.
Let me know if this helps at all.

Programmable api twilio: Can browser client join multiple rooms at same time

[1] Can browser client join multiple rooms at same time from same tab ?
[2] If yes, can audio/video stream shared in room be controller seperatly?
For eg: mute in one room , but unmute in other room.
Twilio developer evangelist here.
There is, as far as I'm aware, no limit to joining multiple rooms within Twilio Programmable Video. You can mute and unmute audio and video tracks on a track by track (and therefore room by room) basis.
Let me know if you try this and you have any problems with it.

Vimeo - videos.getChannels

How can I efficiently retrieve a list of channels that a Vimeo video is listed in from the Advanced Vimeo API?
The Advanced Vimeo API provides the methods channels.addVideo and channels.removeVideo for managing the channels a video belongs to. Also, the channels.getVideos method is provided for retrieving the list of videos belonging to a channel.
However, there is no videos.getChannels method. This means that in order to find all the channels a video is included in one would need to call channels.getVideos (possibly more than once if the channel has more than 50 videos) for each channel of interest. This seems terribly inefficient.
From what I have seen so far it has not been implemented into v1, but will be added into v2. I am still looking to see if there is an alternative
edit*
take a look at this page because they have this method vimeo.channels.getAll
VIMEO
I know this will get you a list of channels, from there I dont know if you can compare that to the video to make a list of channels that the video is in. I'm still looking.