Why can't I adjust background music volume through the system volume?
Mobile devices (iOS/Android) distinguish between media volume and call volume. Under certain SDK configurations, real-time audio and video services use call volume, and adjusting the volume keys will also control the device's call volume. Background music is played using the media channel and requires adjusting the media volume. The two types of volume differ in sound performance, applicable scenarios, and volume control. For details, refer to What is the difference between media volume and call volume.
When the system volume cannot adjust background music, you can use the following two methods:
Method 1:
Use the ZEGOCLOUD Express SDK's media player to play background music. In this case, the background music will be played using the same channel as the real-time audio and video call.
Method 2:
Use the system API of mobile devices (iOS/Android) to directly adjust the volume of the specified channel. For details, refer to:
- iOS: AudioManager
- Android: MPVolumeView
