audioLevels on mobile iOS and Android SDK?

Good morning everyone,

We would like to start experimenting with a walky-talky style audio feature and one-to-many audio feature within our Jitsi based app.

We are all good on the microphone side. But need to manipulate the speaker on each device connected.

For desktop, looks like we should be OK with using “audioLevels” to decide which participants can hear the audio from which other participant/s…

However, Is there a way to do “audioLevels” per participant on mobile? (mobile app, not mobile browser).

Nothing jumped out at me on the mobile SDK.

If possible we’d like to have a crack at it and are happy to contribute the mobile audioLevels code back to the community too.

Thanks!
Daryl

1 Like

hi, has anyone seen this one yet? thanks

Is this possible? Thanks

@saghul might be the best to answer this. If it can be done, I’m sure he’d welcome a PR.

I am also looking same feature for Iphone and ipad for browser.
This feature does not show on Chrome or safari on ios but it shows on Android browsers. I have no knowledge of React but tried to find some solution and noticed following comment at

If using iOS please remember to install cocoapods by running: npx pod-install
For web support please use @react-native-community/slider@next

Any expert opinions. Thanks in advance

We currently don’t have this capability on mobile. A small native part needs to be added to react-native-webrtc but we haven’t gotten around doing it yet.

thanks @saghul

Is this something we can help with? or just easier for you guys to do it when you get round to it?

If we can help, please point us in the right direction.

If you’re willing to send a PR, I’d be happy to review it.

Basicallt we’d need a method on the JS side to call this: webrtc/AudioTrack.java at a16f3fc17e43e4d32743da5a0f21517d8ff696ab · jitsi/webrtc · GitHub (and the equivalent on iOS).

Since this API does not exist on the web, I’d add a _setVolume method on MediaStreamTrack.js, akin to our custom _switchCamera.

2 Likes

thx. We’ll add it to our list of tasks to tackle and report back with progress.

1 Like

@darylhutchings not sure if this thread can help you;

1 Like

thank you @kkd

Actually we do have the enabled property implemented.

1 Like

I am sorry but it is going over my head may be due to lack of understanding of React.
Just to clarify I am looking for this functionality on Iphone & Ipad Browsers ( not for App).
If I understand correctly mobile browsers show responsive web version of Jitsi on mobile browsers.
So basically if Android browsers can show volume control and setParticipantVolume api ( IFrame API · Jitsi Meet Handbook ) works on Android browser why it should not work on Ipad and Iphone.

I am still not been able to figure out where I should be looking at in the code. I am unable to locate file MediaStreamTrack.js

What I said doesn’t apply to the web, just the mobile apps.

Thanks Saghul, But Volume Control is missing on Ipad and iphone browsers. and setparticipantVolume API does not work on iOS, see screen below

I also saw a PR fix(context-menus) Don't show volume slider on iOS web by vp8x8 · Pull Request #9955 · jitsi/jitsi-meet · GitHub where volume control is removed from iOs.

Is there something missing in the iOS browsers or there is another cause.

That looks very deliberate. There might be a reason, I asked my colleagues in the original PR: fix(context-menus) Don't show volume slider on iOS web by vp8x8 · Pull Request #9955 · jitsi/jitsi-meet · GitHub

I think I know why it was removed. On Apple developer site:

Volume Control in JavaScript
On the desktop, you can set and read the volume property of an <audio> or <video> element. This allows you to set the element’s audio volume relative to the computer’s current volume setting. A value of 1 plays sound at the normal level. A value of 0 silences the audio. Values between 0 and 1 attenuate the audio.

This volume adjustment can be useful, because it allows the user to mute a game, for example, while still listening to music on the computer.

On iOS devices, the audio level is always under the user’s physical control. The volume property is not settable in JavaScript. Reading the volume property always returns 1.


2 Likes

Nice find!