im trying to play a protected video which you need to be logged thru our API and get a cookie to access to the m3u8. In Safari, i need to be logged in in order to play the video. I tried to implement this but doesnt work at all.
let cookies: [Any] = HTTPCookieStorage.shared.cookies!
self.playerAsset = AVURLAsset.init(url: urlStream!, options:[AVURLAssetHTTPCookiesKey : cookies])
let item = AVPlayerItem(asset: self.playerAsset!)
self.playerItems.append(item)
Anyone could help me ?