Reputation: 107
Can I play video stream with format .ism/manifest on AppleTV?
I use AVFoundation and AVQueuePlayer. I keep my player in ViewController scope, not in function scope. I've tried to add "(format=m3u8-aapl,audio-only=false)" in the end of url but video has lags after starts. So my code is:
let url = "http://vodstreaming.dev.mr.tv3ce.com/3ba7e5c5-277a-4c4b-b5ae-d06d2524a290/hv5_After_Earth_1080i29_noAudioPCR_6Mbps_fixed_GOP.ism/manifest(format=m3u8-aapl,audio-only=false)"
let playerItem = AVPlayerItem(url: url)
player.insert(playerItem, after: nil)
player.play()
I've read that for iOS exists AVAssetDownloadURLSession but for TvOS don't. Maybe exist other solution for streaming on TvOS?
Upvotes: 1
Views: 304
Reputation: 3322
Looks like you are using Azure Media Services for that stream. Using the format parameter will return a m3u8 manifest, which is generally playable on tvOS, iOS and macOS - provided the codec is correct.
However, you manifest only has a single quality of approx 5 mbit/s. Best practice is to have lower qualities available also. So you might run into buffering issues (if that is what you mean by "has lags after start").
Apple has a set of Best Practices available regarding video streams.
Upvotes: 2