create dynamic Video Room in Janus

2,086 views
Skip to first unread message

Nguyen Huy Tuan

unread,
Jun 1, 2016, 12:32:36 AM6/1/16
to meetecho-janus
Dear Team,
Need support to create dynamic Video Room in Janus?
is it possible or not?

-------------
Janus Vietnam Team 
0948690806

Lorenzo Miniero

unread,
Jun 1, 2016, 1:48:27 AM6/1/16
to meetecho-janus
Yes, with a "create" request. Please search the forum for details, as this has been asked several times already.

L.

Nguyen Huy Tuan

unread,
Jun 1, 2016, 2:08:10 AM6/1/16
to meetecho-janus

Nguyen Huy Tuan

unread,
Jun 1, 2016, 2:08:25 AM6/1/16
to meetecho-janus
Lorenzo, 
Thanks for your respond, 
my mean is create multi Janus video room, like this https://apprtc.appspot.com/

Ireneusz Słonina

unread,
Jun 6, 2016, 7:52:56 AM6/6/16
to meetecho-janus
It is possible.
We're using the videoroom plugin to do such thing.
But it's not out-of-the-box.
You need to create room by yourself.

For example by modyfing janus.attach() in videoroomtest.js:

                success: function () {
                    // Attach to video room test plugin
                    janus.attach(
                            {
                                plugin: "janus.plugin.videoroom",
                                success: function (pluginHandle) {
                                    $('#details').remove();
                                    sfutest = pluginHandle;
                                    Janus.log("Plugin attached! (" + sfutest.getPlugin() + ", id=" + sfutest.getId() + ")");
                                    Janus.log("  -- This is a publisher/manager");
                                    // Prepare the username registration
                                    $('#videojoin').removeClass('hide').show();
                                    $('#registernow').removeClass('hide').show();
                                    $('#register').click(registerUsername);
                                    $('#username').focus();
                                    $('#start').removeAttr('disabled').html("Stop")
                                            .click(function () {
                                                $(this).attr('disabled', true);
                                                janus.destroy();
                                            });
                                    var createRoom = {
                                        "request": "create",
                                        "record": true,
                                        "publishers": 2,
                                        "room": room,
                                        "bitrate": bandwidth,
                                    };
                                    sfutest.send({"message": createRoom});
                                    setTimeout(function(){
                                        autoRegister();
                                    }, 500);
                                },

helper methods:

function autoRegister() {
    username = getURLParameter("username");
    var register = { "request": "join", "room": room, "ptype": "publisher", "display": username };
    myusername = username;
    sfutest.send({"message": register});
}

function getURLParameter(name) {
        return decodeURI(
            (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]
        );

Tony George

unread,
Oct 25, 2022, 3:36:11 AM10/25/22
to meetecho-janus
This is not working

Tony George

unread,
Oct 25, 2022, 3:38:26 AM10/25/22
to meetecho-janus
I added create request with publishers number as 10 but still it showing you are reached maximum publishers(6)
Reply all
Reply to author
Forward
0 new messages