Advertisement
Guest User

Untitled

a guest
Apr 20th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Adding a volume control to a subscriber is not possible now as we normalized the audio and mix it with the system sound.
  2. So your option is to latch onto the system audio.
  3. One way I did that is as follows ( a hack for ios7) when I get a subscriber stream created callback
  4.  
  5. --
  6. -(void) systemVolumeViewSetup
  7.  
  8. {
  9.  
  10. self.player = [[MPMoviePlayerController alloc] initWithContentURL:[self silentMovieURL]];
  11.  
  12. self.player.movieSourceType = MPMovieSourceTypeFile;
  13.  
  14. self.player.fullscreen = YES; // I think this may not be needed
  15.  
  16. self.player.shouldAutoplay = NO;
  17.  
  18.  
  19.  
  20. [self.player play]; // play to catch hold of system value handle
  21.  
  22.  
  23.  
  24. MPVolumeView *myVolumeView = [[MPVolumeView alloc] initWithFrame: CGRectMake(0, 300, 200, 150)];
  25.  
  26. [self.view addSubview: myVolumeView];
  27.  
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement