I am just trying to play network stream in AVPlayer. I can't share the link but this is some informations about :
And the code :
let asset = AVAsset(url: inUrl)
let playerItem = AVPlayerItem(asset: asset)
let playern = AVPlayer(playerItem: playerItem)
print("playable = \(asset.isReadable)") // => false
playern.allowsExternalPlayback = true
playern.play()
Is there something that I'm missing ?
The step I’m missing was to fragment my mpeg-ts to HLS because AVPlayer
can't read my stream.
I finally chose to use MobileVLCKit (https://code.videolan.org/videolan/VLCKit) which provide VLCMediaPlayer
natively play my network stream.