Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

iOS SDK Volume


What's the best way to handle mute/unmute on iOS via the iOS native SDK?

7 Community Answers

Daniel Berger

JW Player Support Agent  
0 rated :

Hi,

My name is Daniel and I am an iOS SDK Support Engineer. Can you please provide me with context on what you are trying to accomplish? The volume is handled on the device level.

Thank you,
Daniel

Derek

User  
0 rated :

When you launch the player I want to volume muted and controlled by custom user control. Currently I am doing: MPMusicPlayerController.applicationMusicPlayer().setValue(0, forKey: "volume") but that is not ideal.

Daniel Berger

JW Player Support Agent  
0 rated :

Hi Derek,

Why is that not ideal? What would you envision as an ideal way to set the volume to mute?

Thanks,
Daniel

derek

User  
0 rated :

It pops the volume HUD

Daniel Berger

JW Player Support Agent  
0 rated :

Hi Derek,

Thank you for responding. Just so I understand, you don’t like that the volume HUD pops up when a user changes the volume level?
I want to ensure I understand your ideal behavior.

Thank you,
Daniel

dereklee

User  
0 rated :

What I am trying to sort out is it appears that if your ringer is off, but music volume is on the audio is not present, is there a way around this?

Daniel Berger

JW Player Support Agent  
0 rated :

Hi Derek,

Thank you for the clarification. The expected behavior for this situation is that if the phone is in silent the user would need to use headphones to hear the audio.
While it is technically possible to play audio while the phone is in silent mode, please note that Apple will reject your app during the submission process under Apple’s regulation 10.5 which states:
“Apps that alter the functions of standard switches, such as the Volume Up/Down and Ring/Silent switches, will be rejected.”
Here is a link to their guideline:
https://developer.apple.com/app-store/review/guidelines/

Please let me know if you have any other questions,
Daniel

This question has received the maximum number of answers.