Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
Announcements
Intel Customer Support will be observing the Martin Luther King holiday on Monday, Jan. 17, and will return on Tues. Jan. 18.
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

video layout update

david_c_1
Beginner
319 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
306 Views

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

Jianjun_Z_Intel
Employee
306 Views

Hi David,

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

Jianjun_Z_Intel
Employee
306 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.

david_c_1
Beginner
306 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
yongtao_x_
Beginner
306 Views

大家好:

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

Lei_Z_Intel1
Employee
306 Views

yongtao x. wrote:

大家好:

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

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

Lei_Z_Intel1
Employee
306 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

alun_a_
Beginner
306 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);
                });
            }

 

yongtao_x_
Beginner
306 Views

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

Jianjun_Z_Intel
Employee
306 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'}

yongtao_x_
Beginner
306 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

 

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

Jianjun_Z_Intel
Employee
306 Views

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

yongtao_x_
Beginner
306 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);
    });
}

bin_li
Beginner
306 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? 

yongtao_x_
Beginner
306 Views

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

david_c_1
Beginner
306 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?

 

 

 
Lei_Z_Intel1
Employee
306 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.

leo_a_
Beginner
306 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?

Naresh_R_1
New Contributor I
306 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

Lei_Z_Intel1
Employee
155 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

Reply