createroom error

createroom error

Hi,

I get the following error when I call N.API.createRoom (I use Node 6.9.5)

/opt/intelcs/webrtc/Release-v3.4/extras/basic_example/nuve.js:8 

TypeError: a.forEach is not a function
   at c (/opt/intelcs/webrtc/Release-v3.4/extras/basic_example/nuve.js:8:10901)
   at Object.e [as createRoom] (/opt/intelcs/webrtc/Release-v3.4/extras/basic_example/nuve.js:8:11273)

....

 

the api I call is:

N.API.createRoom(roomName, 

{

 mode: 'hybrid',

 publishLimit: -1,

 userLimit: 200,

 viewports: {

   "common": {

 mediaMixing: {

   video: {

     maxInput: 30,

     resolution: 'hd720p',

     multistreaming: 1,

     bitrate: 300,

     bkColor: {"r":0, "g":0, "b":0},

     layout: {

     custom: '[{"region":[{"id": "1", "left": 0,"top": 0,"relativesize": 1}]},{"region": [{"id": "1","left": 0,"top": 0.25,"relativesize": 0.49 }, {"id": "2", "left": 0.51, "top": 0.25,"relativesize": 0.49 }]}]'

     },

     avCoordinated: 0,

     crop: 1

   },

   audio: null

 },

 sipInfo:{

    sipServer:'127.0.0.1',

    username:'phone',

    password:'xxx'

 }

   }

   

}

}, 

function (roomID) {

myRoom = roomID._id;

console.log('Created room ', myRoom);

 

var type = 'socketio';

var preference = {isp: 'isp', region: 'region'};

 

N.API.createToken(myRoom, username, role, type, preference,  function (token) {

console.log(token);

res.send( JSON.stringify({token: token , roomId: myRoom}) );

return;

 

}, function() {

 

// errore createToken

res.send(getExceptionJ("Errore durante la creazione del Token di accesso.", err));

return;

 

});  // end gestione createToken

 

}, 

function() {

 

// errore createRoom

res.send(getExceptionJ("Errore durante la creazione della Room.", err));

return;

 

}

);

 

12 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi, there are 2 issues in the createRoom data:

1. as document https://software.intel.com/sites/products/documentation/webrtc/js/class_... defined: viewport values should be an array not an object

2. common  should be the value, its key should be name, viewports should work if defined like this: 

viewports:[{name:"common", mediaMixing: {}}]

 

Thanks for the reply. 

I think you have to correct the example in the documentation on the page you mentioned. My code was taken up exactly from this example:

N.API.createRoom('myRoom', {

mode: 'hybrid',

publishLimit: -1,

userLimit: 30,

viewports: {

"common": {

mediaMixing: {

video: {

maxInput: 15,

resolution: 'hd720p',

multistreaming: 1,

bitrate: 0,

bkColor: {"r":1, "g":2, "b":255},

layout: {

base: 'lecture',

},

avCoordinated: 1,

crop: 1

},

audio: null

},

},

"another": {

mediaMixing: {

video: {

maxInput: 15,

resolution: 'hd1080p',

multistreaming: 1,

bitrate: 0,

bkColor: {"r":1, "g":2, "b":255},

layout: {

base: 'lecture',

},

avCoordinated: 1,

crop: 1

},

audio: null

},

}

}

}, function (res) {

console.log ('Room', res.name, 'created with id:', res._id);

}, function (err) {

console.log ('Error:', err);

});

 

 

Thanks for the correction, we will update doc in the future release

Hi,

I'm trying to create a room with the options below. However the room is created with the default options and no viewport is created.

In the logs I do not seem to see any  error.

What am I doing wrong?

 

opts = { 

        mode: 'hybrid',

        publishLimit: -1,

        userLimit: 200,

        enableMixing : 1,

        viewports: [

        {

                   name : "common",

                   mediaMixing: {

                  video: {

                            maxInput: 30,

                            resolution: 'hd1080p',

                            multistreaming: 1,

                            bitrate: 300,

                            bkColor: {"r":0, "g":0, "b":0},

                            layout: {

                                    custom: [{"region":[{"id": "1", "left": 0,"top": 0,"relativesize": 1}]},{"region": [{"id": "1","left": 0,"top": 0.25,"relativesize": 0.49                                                     }, {"id": "2", "left": 0.51, "top": 0.25,"relativesize": 0.49 }]}]

                            },

                      avCoordinated: 0,

                      crop: 1

              },

                      audio: null

            }

        },                 

         {

              name : "regia",

                      mediaMixing: {

                                      video: {

                                                maxInput: 30,

                                                resolution: 'hd1080p',

                                                multistreaming: 1,

                                        bitrate: 300,

                                              bkColor: {"r":0, "g":0, "b":0},

                                                layout: {

                                                custom: [{"region":[{"id": "1", "left": 0,"top": 0,"relativesize": 1}]},{"region": [{"id": "1","left": 0,"top":                                                                                         0.25,"relativesize": 0.49 }, {"id": "2", "left": 0.51, "top": 0.25,"relativesize": 0.49 }]}]

                                                },

                                                avCoordinated: 0,

                                        crop: 1

                                        },

                                audio: null

                    }

               }

           ]

};

Hi,

no indication on my last question?

Hi, David, there is a bug in v3.4 for viewport, and we have fixed it in v3.4.1. Please use MCU with 3.4.1

updating to version 3.4.1 has resolved the problem, but the mixed stream bitrate does not meet the maximum set limit of 300 Kbs. It is around 2 Mbps. Why?

Hi, david, bitrate option in createRoom API is deprecated in 3.4, if you want to limit bitrate of subscribed stream, please specify qualituLevel option in subscribe API.

one mistake in previous comment, should be qualityLevel:

Hi, david, bitrate option in createRoom API is deprecated in 3.4, if you want to limit bitrate of subscribed stream, please specify qualityLevel option in subscribe API.

Ok thanks for the reply but I would like to understand in more detail the effect of these parameters on a video session of "n" participants with heterogeneous network bandwidth. 

I'm developing a web conference application that aims to have 100 participants, so I have to be sure of the network bandwidth that I have to allocate on the server.

 

many thanks for the kind reply you will give me

 

David

 

 

 

For subscribe actions, bandwidth mainly related to resolution and qualityLevel, here is a reference table for bitrate in different resolution and qualityLevel:

quality-bitrate

Leave a Comment

Please sign in to add a comment. Not a member? Join today