Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).

video layout update

david_c_1
Beginner
1,218 Views
Good morning, 
how can I update in real time the layout of a mixed stream through  N.API.updateRoom?
 
0 Kudos
22 Replies
ckristian_z_
Beginner
1,143 Views

I have the same question and would like to know if each user can have a different layout for the mixed stream..

0 Kudos
Jianjun_Z_Intel
Employee
1,143 Views

Hi David,

Please take a look at the conferenceClient.getRegion and conferenceClient.setRegion functions. I think that's what you're looking for.

0 Kudos
Jianjun_Z_Intel
Employee
1,143 Views

Please note that above functions does not change layout, it gets or sets the region for a specific stream in the pre-defined layout.

0 Kudos
david_c_1
Beginner
1,143 Views
Hi,
I was not clear enough in my question.
I'm trying to change the layout of the room and not the allocation of regions.
My goal is to switch between two custom layout (defined with my json) without having to re-join the room
0 Kudos
yongtao_x_
Beginner
1,142 Views

大家好:

   现在测试发现视频第一个画面始终被有声音的视频占用,这个是在哪里配置的呢,如何取消呢?

0 Kudos
Lei_Z_Intel1
Employee
1,143 Views

yongtao x. wrote:

大家好:

   现在测试发现视频第一个画面始终被有声音的视频占用,这个是在哪里配置的呢,如何取消呢?

可以在createRoom或者updateRoom时把avCoordinate这个flag置成false,它控制了VAD的功能。

0 Kudos
Lei_Z_Intel1
Employee
1,143 Views

david c. wrote:

Hi,
I was not clear enough in my question.
I'm trying to change the layout of the room and not the allocation of regions.
My goal is to switch between two custom layout (defined with my json) without having to re-join the room

Hi, David

Current multiple layouts are defined for the different participant number, layout changes along with the participant number change. For the same participant number, the multiple layout support will be available in next v3.4 release around late May.

Best wishes,

Zhai Lei

0 Kudos
alun_a_
Beginner
1,143 Views

vi extras/basic_example/basicServer.js

add the following code:

app.post('/updateRoom/', function (req, res) {
    'use strict';
    N.API.updateRoom(req.body.rid,req.body.options, function (response) {
        res.send(response);
    },function (err) {
        res.send(err);
    });
});

javascript client:

updateRoom = function (roomId, name,enableMixing, publishLimit, userLimit,crop,resol,quality_level,multistreaming, callback) {
                var Options = {
                    name: name,
                    publishLimit: publishLimit,
                    userLimit: userLimit,
                    enableMixing: enableMixing,
                    mediaMixing: {
                        video: {
                            //maxInput: 15,
                            resolution: resol,
                            multistreaming: multistreaming,
                            quality_level:quality_level,
                            crop: crop
                        }
                    }
                };
               // ajax send method
                send(null, 'POST', "json", 'updateRoom/', false, {rid: roomId, options: Options}, function (err, text) {
                    if (err) return clog(err, text);
                    callback(text);
                });
            }

 

0 Kudos
yongtao_x_
Beginner
1,143 Views

 conferenceClient.getRegion and conferenceClient.setRegion  这个接口是使用publish后的流对象ID吗? 返回错误告诉流ID不存在。

0 Kudos
Jianjun_Z_Intel
Employee
1,143 Views

yongtao x. wrote:

 conferenceClient.getRegion and conferenceClient.setRegion  这个接口是使用publish后的流对象ID吗? 返回错误告诉流ID不存在。

The first argument of getRegion and setRegion is an object. For getRegion, it should be something like {id: 'the stream id'}

0 Kudos
yongtao_x_
Beginner
1,143 Views

conference.setRegion({
        id: streamId,
        region: '1'
    }, function() {
        L.Logger.info('setRegion succeeded');
    }, function(err) {
        L.Logger.error('setRegion failed:', err);
    });

INFO: local stream published: 888259284431114800
woogeen.sdk.js:590 INFO: subscribed: 5913d05f04c8f51456fe04a1
woogeen.sdk.js:590 ERROR: setRegion failed: Stream 888259284431114800does not exists
woogeen.sdk.js:590 INFO: stream added: 888259284431114800

 

是这样写法吗?还是返回不存在呢?

0 Kudos
Jianjun_Z_Intel
Employee
1,143 Views

When do you setRegion? In the success callback of publish?

0 Kudos
yongtao_x_
Beginner
1,143 Views

conference.publish(localStream, {}, function(stream) {
    conference.setRegion({
        id: stream.id(),
        region: '1'
    }, function() {
        L.Logger.info('setRegion succeeded');
    }, function(err) {
        L.Logger.error('setRegion failed:', err);
    });
}

0 Kudos
bin_li
Beginner
1,143 Views

Lei Zhai (Intel) wrote:

Quote:

david c. wrote:

 

Hi,
I was not clear enough in my question.
I'm trying to change the layout of the room and not the allocation of regions.
My goal is to switch between two custom layout (defined with my json) without having to re-join the room

 

 

Hi, David

Current multiple layouts are defined for the different participant number, layout changes along with the participant number change. For the same participant number, the multiple layout support will be available in next v3.4 release around late May.

Best wishes,

Zhai Lei

Hi Lei,

When will a new version be released to introduce this new feature that support multiple layout in same conference? 

0 Kudos
yongtao_x_
Beginner
1,143 Views

setRegion 还是这个问题,断点到 SDK  this.setRegion = function(a, c, d) { 就能设置成功,确实是在publish 成功后设置的窗口布局

0 Kudos
david_c_1
Beginner
1,143 Views

Lei Zhai (Intel) wrote:

Quote:

david c. wrote:

 

Hi,
I was not clear enough in my question.
I'm trying to change the layout of the room and not the allocation of regions.
My goal is to switch between two custom layout (defined with my json) without having to re-join the room

 

 

Hi, David

Current multiple layouts are defined for the different participant number, layout changes along with the participant number change. For the same participant number, the multiple layout support will be available in next v3.4 release around late May.

Best wishes,

Zhai Lei

 

Hi,

Does version 3.4 implement the layout 
switching function through the 
viewports? Does this mean that I need 
to alternate between the various 
mixedstream of viewports for changing 
layouts?

 

 

 
0 Kudos
Lei_Z_Intel1
Employee
1,143 Views

v3.4 released and multiple layouts can be specified for the same room and different mixed streams will be generated at the same time.

0 Kudos
leo_a_
Beginner
1,143 Views

Lei Zhai (Intel) wrote:

v3.4 released and multiple layouts can be specified for the same room and different mixed streams will be generated at the same time.

Hi, may I ask when the PublishLimit works? I found that if PublishLimit set as 1 or 0 in A room, all users joined in A room can publish success. why this happened?

0 Kudos
Naresh_R_1
New Contributor I
1,143 Views

Hi Lei,

In v3.4 when i enable multiple layouts, second subscribed video is empty. is there any specific configuration for the same

Thanks

Naresh

0 Kudos
Lei_Z_Intel1
Employee
992 Views

Hi, Naresh

Thanks for raising this topic. v3.4 document is not good enough on this part. The published streams only exist in first common view port by default. Customers need to login as 'manger' role and use ConferenceClient.mix/unmix to control them whether exist in other layout/view port after publishing.

Best wishes,

Zhai Lei

0 Kudos
Reply