自定义标题与HTML5视频请求 [英] Custom headers with HTML5 video requests
本文介绍了自定义标题与HTML5视频请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个视频资源位于OAuth 2.0后面,希望通过< video>
标签显示它。我如何发送 Authorization
标题与视频请求?
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?
推荐答案
这个问题并且像这样在URL查询参数中发送授权令牌(服务器端代码必须被改变为允许从请求头和请求查询参数中读取令牌): http://www.example.com/ samplevideo?Authorization = sample_token
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
这篇关于自定义标题与HTML5视频请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文