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

Unable to set stream attributes

Nithin_P_
New Contributor I
619 Views

Hi,

             Unable to set custom attribute for stream. in 3.x we can set stream attribute using the following cod

             stream.attr ("userName", userName);

But in 4.0 we cant use the function

Also unable to set ice servers

conference.setIceServers([{urls:["stun:sdfsdfsdf:443"]},{urls:["turn:sdfsdfdsf.com:443?transport=tcp","turn:turn.fsdfs.com:443?transport=udp],username:"dsfsdfs",credential:"45345354353"}]);

The above code not working

Thank you,

0 Kudos
8 Replies
Nithin_P_
New Contributor I
619 Views

Hi,

I have find answer for second question we can set stream attribute using the following

                 mediaStream                 = stream;
                var streamAttribute         = {};
                streamAttribute.userName    = userName;
                localStream                 = new Ics.Base.LocalStream(
                    mediaStream, new Ics.Base.StreamSourceInfo(
                        'mic', 'camera'),streamAttribute);

this attributes can be read at subscription part using the following code

event.stream.attributes

 

Thank you,

 

0 Kudos
Qiujiao_W_Intel
Employee
619 Views

Hi, Nithin, set ice server API have changed in version 4.0, we follow W3C WebRTC 1.0 definitions and initialize ice server when creating conference client, please refer our 4.0 document , latest document can be downloaded, here is an exanple:

var conference = Woogeen.ConferenceClient.create({iceServers : [{

        urls: "turn:xx.xx.xx.xx:443?transport=tcp",

       credential: "password",

       username: "username"

        }]});

0 Kudos
Nithin_P_
New Contributor I
619 Views

Hi Qiujiao,

      I have set ice servers using the following code but not working. i cant find any ice servers in chrome://webrtc-internals/ 

var conference = new Ics.Conference.ConferenceClient(

{iceServers : [{

        urls: "turn:xx.xx.xx.xx:443?transport=tcp",

       credential: "password",

       username: "username"

        }]}

);

mcu version : 4.0

chrome version : latest

mcu server : centos 7.4

mode : conference mode ( not peer to peer )

i have used valid turn servers which is functional in other webrtc application.

Thank you

0 Kudos
Qiujiao_W_Intel
Employee
619 Views

Sorry for my mistake, i paste an old version sample, please try the latest version:

 const conference = new Ics.Conference.ConferenceClient({

    rtcConfiguration: {

      iceServers: [{

        urls: ["turn:xx.xx.xx.xx?transport=tcp"],

        credential: "xxx",

        username: "xxx"

      }]

    }

  });

0 Kudos
david_c_1
Beginner
619 Views

Hi,

How can I change attributes after creating the stream?
0 Kudos
Qiujiao_W_Intel
Employee
619 Views

Hi, david, stream attribute cannot be changed after creating. What's your scenario needing change stream attribute?

0 Kudos
david_c_1
Beginner
619 Views

Hi Qiujiao,

thank's for the reply.

In version 3.x I use the .attr() API to modify the attributes of the local stream used by the application (for example I use a flag to indicate if the stream belongs to the moderator user). I know I can handle this in another way but I found it useful to be able to set the attributes locally even after the stream was created.

 
0 Kudos
Qiujiao_W_Intel
Employee
619 Views

David, for your scenario please try another way to make it work, attribute cannot be modified after stream is created from 4.0.

0 Kudos
Reply