red5pro / streaming-android

This repository contains a simple project with a number of Android examples that can be used for testing and reference.
Other
84 stars 35 forks source link

How to control the audio playback volume? #82

Open liuzhen2008 opened 7 years ago

liuzhen2008 commented 7 years ago

I am trying to modify the volume for an "R5Stream", specifically, I would like to be able to mute or unmute it without tinkering with the system volume.

(Much like how in MediaPlayer, it provides a setVolume method that doesn't interfere with the system volume).

Is this currently possible with the red5pro android/iOS sdk?

HoldenMills commented 7 years ago

Hello, We have a working example for iOS. We don't have a working example for muting the audio stream in an Android app, but you could write your own using the muteAudio function in the R5AudioController. https://www.red5pro.com/docs/static/android-streaming/classcom_1_1red5pro_1_1streaming_1_1media_1_1_r5_audio_controller.html#ab301bab39f2b9cd3c05e7cc18bed9722