Player icon indicating copy to clipboard operation
Player copied to clipboard

How to add HTTP Headers with the url.

Open er-aman-gupta opened this issue 5 years ago • 1 comments

I have to play video from a URL, and i need to send some http request headers along with it. Could not find anything related to it.

How would we go about doing it?

er-aman-gupta avatar Dec 02 '20 06:12 er-aman-gupta

Hello,

Maybe is too late to the answer but, you can try with:

`let headers: [String: String] = [ "custome_header": "custome value" ]

let asset = AVURLAsset(url: VIDEO_URL, options: ["AVURLAssetHTTPHeaderFieldsKey": headers])

YOUR_PLAYER.asset = asset`

novecapa avatar Aug 16 '22 14:08 novecapa