Custom headers with HTML5 video requests

前端 未结 2 1969
轮回少年
轮回少年 2021-01-01 12:45

I have a video resource sitting behind OAuth 2.0 wall and want to display it via tag. How can I send Authorization header with video

2条回答
  •  走了就别回头了
    2021-01-01 12:56

    As far as i know, you can't.

    But you can still use the error attribute to check if the element can fetch the video from JavaScript, and redirect to an authentication page if not.

提交回复
热议问题