I have a video resource sitting behind OAuth 2.0 wall and want to display it via <video>
tag. How can I send Authorization
header with video requests?
Asked
Active
Viewed 8,383 times
2 Answers
5
i had this problem and sent Authorization token in url query parameter like this (server side code must be changed to allow reading Token From both request header & request query parameter) : http://www.example.com/samplevideo?Authorization=sample_token

Soheil Ghahremani
- 1,135
- 1
- 16
- 36
0
As far as i know, you can't.
But you can still use the error
attribute to check if the <audio>
element can fetch the video from JavaScript, and redirect to an authentication page if not.

m-r-r
- 555
- 6
- 15
-
5Authentication status is not a problem. I already have a token, but need to attach it to the video request. I can't fetch video data with an AJAX request. – Alex B Aug 03 '12 at 15:02