Code Block let asset = AVURLAsset(url: url, options: ["AVURLAssetHTTPHeaderFieldsKey": ["key": "value"]]) let playerItem = AVPlayerItem(asset: asset) let player = AVPlayer(playerItem: playerItem) VideoPlayer(player: player).onAppear(perform: { player.play() })
I have used the same code to prepare the AVPlayer object on an iOS app and using AVPlayerViewController everything worked properly... but right now on a SwiftUI app I'm using VideoPlayer and it's not playing the video. Is there an issue with VideoPlayer not recognizing AVURLAssetHTTPHeaderFieldsKey??
This is the error I see in the debugger
sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd}