0

I used code like below, while I failed to find out an way to set the timeout. The default timeout is around 1min, I just want to change it to be like 10s. Any help is greatly appreciated.

AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:wpTrack.url];

_audioPlayer = [AVQueuePlayer queuePlayerWithItems:[NSArray arrayWithObject:playerItem]];

[playerItem addObserver:self forKeyPath:@"status" options:0 context:nil];

[playerItem addObserver:self forKeyPath:@"loadedTimeRanges" options:NSKeyValueObservingOptionNew context:nil];
Fahri Azimov
  • 11,470
  • 2
  • 21
  • 29
James
  • 227
  • 1
  • 2
  • 11

0 Answers0