In my viewDidLoad I have:
Over cellular connection, this ends up stopping constantly for buffering. My first question is if there is a way to adjust this, or change bitrate or anything at all to make a smoother playback?
second question is how can I get the AVPlayer to play in background? I thought that all was needed was to add to the .plist the Required Background Modes array set to App Plays Audio. However, when I go to background mode, it always stops.
Code:
AVPlayerItem* playerItem = [AVPlayerItem playerItemWithURL:[NSURL URLWithString:@"http://s4.voscast.com:8080/"]];
[playerItem addObserver:self forKeyPath:@"timedMetadata" options:NSKeyValueObservingOptionNew context:nil];
self.player = [[AVPlayer playerWithPlayerItem:playerItem] retain];
[self.player play];
second question is how can I get the AVPlayer to play in background? I thought that all was needed was to add to the .plist the Required Background Modes array set to App Plays Audio. However, when I go to background mode, it always stops.