Muting AVPlayer Http Live Streaming video

I was wondering if I can mute AVPlayer playing HTTP Live Streaming video ?

I have already tried several things, for example, the Apple method to specify the AVPlayer volume described here but it only works for local files ... (see the note at the bottom of the Apple documentation).

A similar method described in this post also does not work.

Is there a solution? I really do not want to turn off the sound of the device, but only one video, while other players can have their own sound (the user can balance the sound between the players).

Thanks in advance.

+5
source share
3 answers

According to the AVFoundation command, it is not possible to disable or disable the HLS video track.

+1
source

iOS 7.0 now provides support when disconnecting a player using

[AVPlayer setVolume:(float)volume] 

It also works for HTTP Live Streaming, my application makes extensive use of it.

+4
source

You can disconnect an entire audio session using a shared instance of MPMusicPlayerController.

[[MPMusicPlayerController applicationMusicPlayer ]setVolume:0];
0
source

All Articles