Avplayeritem
AVPlayerItem
Resolution
If you want to have a specific bitrate to be targeted by the AVFoundation library.
Apple has a property .preferredpeakbitrate
which you can use to guide the system to try its best to achieve that.
preferredMaximumResolution
The desired maximum resolution of a video that is to be downloaded
apple docs | max resolution
no framerate adjustment on video playback.
expensive networks (mobile, lte, 4g, 5g ?)
var preferredPeakBitRateForExpensiveNetworks: Double { get set }
Monitor playback
Get current Asset duration and playhead position or time in seek position
if let currentItem = player.currentItem {
let duration = CMTimeGetSeconds(currentItem.duration)
let currentTime = CMTimeGetSeconds(currentItem.currentTime())
print("Duration: \(duration) s")
print("Current time: \(currentTime) s")
}
Seek
HLS Event Style playlist with live and VOD content.
Seeking at initial start point - github thread
EXT-X-START:TIME-OFFSET=x
apple docs old | Event Style Playlist