title: Mute audio tracks of live streams using AVPlayer
body: <p>I am using AVPlayer to play live stream (m3U8 file).  It plays perfectly using AVPlayer but I am not able to mute it.</p>
  
  <p>I am using following code to mute the audio.</p>
  
  <pre><code>NSMutableArray *allAudioParams = [NSMutableArray array];
  for (AVPlayerItemTrack *track in _player.currentItem.tracks)
  {
      if ([track.assetTrack.mediaType isEqual:AVMediaTypeAudio])
      {
          AVMutableAudioMixInputParameters *audioInputParams =    [AVMutableAudioMixInputParameters audioMixInputParameters];
          [audioInputParams setVolume:0.0 atTime:kCMTimeZero];
          [audioInputParams setTrackID:[track.assetTrack trackID]];
          [allAudioParams addObject:audioInputParams];
      }
  }
  
  AVMutableAudioMix *audioZeroMix = [AVMutableAudioMix audioMix];
  [audioZeroMix setInputParameters:allAudioParams];
  [[_player currentItem] setAudioMix:audioZeroMix];
  </code></pre>
  
  <p>With the same code I able to mute the local video files as well as progressive video urls which I am playing in same AVPlayer code.</p>
  
  <p>(may be for live stream video , tracks available in AVPlayer instance can be set volume ZERO but next buffering tracks are fresh with volume, am i right or any other reasons?)</p>
  
  <p>Anybody have any idea on this issue. Any help on this is highly appreciable.</p>