[Solved] How to tell if a video is HDR or not in Swift?

Simple and precise: var isHdrVideo = false let pVideoTrack = AVAsset(url: URL(fileURLWithPath: assetURL!)) if #available(iOS 14.0, *) { let tracks = pVideoTrack.tracks(withMediaCharacteristic: .containsHDRVideo) for track in tracks{ isHdrVideo = track.hasMediaCharacteristic(.containsHDRVideo) if(isHdrVideo){ break } } } solved How to tell if a video is HDR or not in Swift?

[Solved] How to convert ++ or — in Swift 3? [duplicate]

What you want IMHO @IBAction func didTapPreviousButton(_ sender: UIButton) { currentTrack -= 1 if currentTrack < 0 { currentTrack = (urlPlayerItems.count – 1) < 0 ? 0 : (urlPlayerItems.count – 1) } playTrack() } Correct replacing of POSTFIX as you have it (useless) @IBAction func didTapPreviousButton(_ sender: UIButton) { if currentTrack < 0 { currentTrack … Read more