Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add HTTP Headers with the url. #234

Open
er-aman-gupta opened this issue Dec 2, 2020 · 1 comment
Open

How to add HTTP Headers with the url. #234

er-aman-gupta opened this issue Dec 2, 2020 · 1 comment

Comments

@er-aman-gupta
Copy link

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?

@novecapa
Copy link

novecapa commented Aug 16, 2022

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`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants