Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Muting an AVPlayer playing Http Live Streaming video

I was wondering if I could mute the sound of an AVPlayer playing a HTTP Live Streaming video?

I've already try several things, like the Apple method to set the volume of an AVPlayer explained here but it works only for local files... (cf. the note at the bottom of Apple documentation).

The similar method explained in this post does not working either.

Is there an solution? I really don't want to mute the sound of the device but only one video while other players could have their own audio (the user could balance audio between players).

Thanks in advance.

like image 205
iGranDav Avatar asked May 04 '12 13:05

iGranDav


1 Answers

iOS 7.0 now provides support for muting the player using

[AVPlayer setVolume:(float)volume] 

It also works for HTTP Live Streaming, my app is making extensive use of it.

like image 59
d-jay Avatar answered Oct 24 '22 23:10

d-jay