Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
58 Views

video layout update

Good morning, 
how can I update in real time the layout of a mixed stream through  N.API.updateRoom?
 
Tags (2)
0 Kudos
22 Replies
Highlighted
Beginner
57 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
Highlighted
57 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
Highlighted
57 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
Highlighted
Beginner
57 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
Highlighted
Beginner
57 Views

大家好:

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

0 Kudos
Highlighted
Employee
57 Views

yongtao x. wrote:

大家好:

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

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

0 Kudos
Highlighted
Employee
57 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
Highlighted
Beginner
57 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
Highlighted
Beginner
57 Views

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

0 Kudos
Highlighted
57 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
Highlighted
Beginner
57 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
Highlighted
57 Views

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

0 Kudos
Highlighted
Beginner
57 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
Highlighted
Beginner
57 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
Highlighted
Beginner
57 Views

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

0 Kudos
Highlighted
Beginner
57 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
Highlighted
Employee
57 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
Highlighted
Beginner
57 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
Highlighted
New Contributor I
57 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