Get Sent bitrate, mute remote videos (Remote/Local stream functions)

381 views
Skip to first unread message

kitin...@gmail.com

unread,
Nov 20, 2015, 8:52:36 AM11/20/15
to meetecho-janus
Hi Lorenzo / All,

First of all thanks for all the work you've put into Janus, it's been very useful in setting up WebRTC conference rooms.
I had some questions about the GetBitrate / muteVideo / isVideoMuted functions.

The GetBitrate function is very useful to see the other users bitrate (Firefox really needs b=as support!)  and was hoping I could use it to get my own outgoing bitrate / bytes sent
but it looks like it's not just a matter of changing bytesReceived to bytesSent.

Then also the same list of functions you recently added muteVideo, isVideoMuted etc. but unlike the GetBitrate function these only seem to work for the local feed, not the remote ones, so I used local <video> muting for now

Is this as intended, to have functions (muteVideo, isVideoMuted) on remote feeds that cannot be used with them?
Did you consider making these work for both or adding separate functions for Local / Remote (if remote Video / Audio feeds can actually be muted in the same way)? I quickly tried using config.remoteStream.stream instead of myStream in the function but am probably missing something else here.

Thoughts on how/where you think the functions should be added would be appreciated, I'll keep tinkering for now

Thanks,
Michael





Lorenzo Miniero

unread,
Nov 20, 2015, 8:58:30 AM11/20/15
to meetecho-janus
Il giorno venerdì 20 novembre 2015 14:52:36 UTC+1, kitin...@gmail.com ha scritto:
Hi Lorenzo / All,

First of all thanks for all the work you've put into Janus, it's been very useful in setting up WebRTC conference rooms.
I had some questions about the GetBitrate / muteVideo / isVideoMuted functions.

The GetBitrate function is very useful to see the other users bitrate (Firefox really needs b=as support!)  and was hoping I could use it to get my own outgoing bitrate / bytes sent
but it looks like it's not just a matter of changing bytesReceived to bytesSent.



Actually that's what you have to do, check bytesSent, but just not on the same object you read bytesReceived from. Outgoing and incoming channels are listed separately when you do a getStats, so you have to look for the right one.

 
Then also the same list of functions you recently added muteVideo, isVideoMuted etc. but unlike the GetBitrate function these only seem to work for the local feed, not the remote ones, so I used local <video> muting for now

Is this as intended, to have functions (muteVideo, isVideoMuted) on remote feeds that cannot be used with them?
Did you consider making these work for both or adding separate functions for Local / Remote (if remote Video / Audio feeds can actually be muted in the same way)? I quickly tried using config.remoteStream.stream instead of myStream in the function but am probably missing something else here.



muteVideo and isVideoMuted refer to the local stream, not the remote one. They're helpers to let you quickly mute whatever you're sending. It was never meant as a way to mute the remote stream. To do that you have to use the plugin-specific requests, e.g., to instruct the plugin not to forward you the media you don't want. As an alternative, implement your own out-of-band messaging, so that you can have the publisher mute themselves using muteVideo after some feedback received by somebody else.

L.

kitin...@gmail.com

unread,
Nov 20, 2015, 9:10:49 AM11/20/15
to meetecho-janus
Thanks for the quick reply! 

Good to know I was indeed getting in the right direction with bytesSent, I'll read up on how to get the right object for the outgoing stats 

Thanks for the clarification on muting, that makes sense, I'll indeed use something to send a signal to forceMute locally when needed and just mute the <video> element if it's just a local mute 
I was unsure because I could see the functions available on those remoteFeed objects so wasn't sure whether those were intented to be available there

Regards
Reply all
Reply to author
Forward
0 new messages