I am building a radio/podcast streaming app and have been getting the following note in the output terminal. I have been ignoring it as it didn't seem to effect anything but it now seems to be effecting my use of a UISlider as a seekbar to skip further or earlier in the track. I am aware that Multipath is to help the stream go seamlessly from wifi to 4G but i can't work out how to implement it into my player.
my player is as follows and takes in the URL of the audio as the argument
func loadRadio(radioURL: String) {
guard let url = URL.init(string: radioURL) else { return }
if let playerItem = self.playerItem {
playerItem.removeObserver(self, forKeyPath: #keyPath(AVPlayerItem.status), context: &playerItemContext)
}
let playerItem = AVPlayerItem.init(url: url)
self.playerItem = playerItem
playerItem.addObserver(self, forKeyPath: #keyPath(AVPlayerItem.status), options: [NSKeyValueObservingOptions.old, .new], context: &playerItemContext)
AudioService.shared.player = AVPlayer.init(playerItem: playerItem)
AudioService.shared.player?.automaticallyWaitsToMinimizeStalling = false;
AudioService.shared.player?.play()
}
the docs for it are here: https://developer.apple.com/documentation/foundation/urlsessionconfiguration/improving_network_reliability_using_multipath_tcp
but the implementation of it is beyond me.
What do i need to add to the code to enable the handover
type of multipath service type
?