Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
1 View

Unable to set stream attributes

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,

Webrtc Nodejs engineer +919809888818 skype: nithinj2e
Tags (2)
0 Kudos
8 Replies
Highlighted
New Contributor I
1 View

Hi,

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,

 

Webrtc Nodejs engineer +919809888818 skype: nithinj2e
0 Kudos
Highlighted
1 View

Hi, Nithin, set ice server

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
Highlighted
New Contributor I
1 View

Hi Qiujiao,

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

Webrtc Nodejs engineer +919809888818 skype: nithinj2e
0 Kudos
Highlighted
1 View

Sorry for my mistake, i paste

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
Highlighted
Beginner
1 View

Hi,

Hi,

How can I change attributes after creating the stream?
0 Kudos
Highlighted
1 View

Hi, david, stream attribute

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

0 Kudos
Highlighted
Beginner
1 View

Hi Qiujiao,

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
Highlighted
1 View

David, for your scenario

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