@PatrickDevX, I tired your solution and it works amazing for videos saved in project directory, but when I try to play video via URL, I can hear sound of video but view is black. Can you please tell me any workaround for this?
I am creating asset via AVURLAsset
let asset = AVURLAsset(url: URL(string: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4")!)
let playerItem = AVPlayerItem(asset: asset)
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: