Custom Headers With Html5 Video Requests
I have a video resource sitting behind OAuth 2.0 wall and want to display it via
Solution 1:
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
Solution 2:
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.
Post a Comment for "Custom Headers With Html5 Video Requests"