title: Quickblox - No Audio in Video Call
body: <p>My app is using the Quickblox video chat with custom video and audio capture sessions. Everything was working great, however, in our login view controller (the view controller immediately proceeding the home view controller with Quickblox video chat), we added a video background (see code below).</p>
  
  <p>Now, audio is only working sporadically in our video chat calls. Usually the first call works fine, but after that, one of the users (or both) receives no audio output during the call.</p>
  
  <p>Below is the code we added to the login view controller. Is there anything here that would cause problems with Quickblox audio? Note that when the view disappears, I pause the player and remove the sublayer.</p>
  
  <pre><code>NSString *filepath = [[NSBundle mainBundle] pathForResource:@"loginbg3" ofType:@"mp4"];
  NSURL *fileURL = [NSURL fileURLWithPath:filepath];
  
  player = [AVPlayer playerWithURL:fileURL];
  layer = [AVPlayerLayer playerLayerWithPlayer:player];
  
  [layer setVideoGravity:AVLayerVideoGravityResizeAspectFill];
  
  player.actionAtItemEnd = AVPlayerActionAtItemEndNone;
  
  layer.frame = CGRectMake(0, 0, 320, 600);
  
  [_videoSuper.layer addSublayer: layer];
  </code></pre>