Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

AudioSubscribers and new Publishers

Avatar

Level 4

Hi,

If i set:

view.audioSubscriber.setLocalVolume(0, userID);

and

view.audioSubscriber.setLocalVolume(0);

This seems to be fine. Untill...

New user comes on. I also find that it just stops working. no clicking or anything. its silent then i get volume.

Does the volume reset when there are new people on?

thanks.

...russ

8 Replies

Avatar

Employee

According to the code, the volume doesn’t get reset when new people join a session :). I would test the scenario you mentioned, and follow up with you.

Thanks

Arun

Avatar

Level 4

Thanks Arun,

I should be a litle more clear.

Its not when someone comes into the room. its when someone starts streaming the mic and cam.

I have my volume set to 0 then I pickup somone's stream and then I hear them again.

thanks.

...russ

Avatar

Employee

Hi Russ,

I was able to reproduce the scenario you mentioned.

So when a new user enters, you might be able to hear him but not others who were already there and whose stream volume was already modified.

To be more specific, setLocalVolume adjusts the volume of the audio stream that is recieved at the subscribers end. So when you call setLocalVolume(0), then it adjusts the volume of all audio streams present to 0. But when a new user enters after setLocalVolume is called, his stream volume is not set. Hence you hear him.

The work around would be to call setLocalVolume to every new user who starts publishing.

Thanks

Arun

Avatar

Level 10

Hey Russ,

Could you clarify a little? What happens when the new user comes in? I

found this hard to sort out :

A) It just stops working

B) It's silent

C) Then you get volume

thanks

nigel

Avatar

Level 10

Ah, now I get what you all mean - you're trying to mute the streams

locally. I was reading it all backwards... Silence is a good thing! 😃

nigel

Avatar

Level 4

LOL it's cool.

Yea im trying to get some level of volume control and tried 5 different ways but im sure im doing it wrong.

it seemed to reset when dealing with other streams.

thanks guys!

...russ

Avatar

Level 4

Arun,

It sounds like the best way to handle it is..

See if there is a new stream. The tell each client to check their settings and reset them.

So I add a listener to stream manager and check whats going though.

Am i close

thanks.

...russ

Avatar

Employee

Yep Russ, That’s the ways...

You can add listener to StreamManager or AudioSubsriber and make each client to set the volume of the new stream.

Ex - audioSub.addEventListener(StreamEvent.STREAMRECEIVE,onStreamRecieve);

Thanks

Arun