简体   繁体   English

使用 http 标头播放 Html 5 视频?

[英]Html 5 video play with http headers?

How to play by adding a headers from a link with html 5?如何通过从带有 html 5 的链接添加标题来播放? For example: xxxx.comv?v=36474, this link does not open without certain http headers, my question is when we want to play with html5, do we have a chance to add these http headers?例如:xxxx.comv?v=36474,这个链接没有某些http headers就打不开,我的问题是当我们想玩html5时,我们有机会添加这些http headers吗? I need to add hedaers:我需要添加hedaers:

"authority: xxx.xxx.xy" "user-agent: Mozilla" "sec-fetch-dest: empty" "accept: */*" "origin: https://www.yyyy.com" "sec-fetch-site: cross-site" "sec-fetch-mode: cors" "referer: https://www.yyyy.com/p4p.php?v=7f0baeb86d31f0bdb56d452d83020aaf52f0c7a1401c10ab10e4141629d9682b" "accept-language: tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7"

There are only very limited things you can do to affect the request headers sent when a link is clicked on (such as using rel="noreferrer" .您可以做的事情非常有限,可以影响单击链接时发送的请求标头(例如使用rel="noreferrer"

You can't set arbitrary headers to arbitrary values.您不能将任意标题设置为任意值。

If you are using XMLHttpRequest or fetch instead of a link then there are methods to set headers, but a number of the headers you want to set are forbidden , so that won't work either.如果您使用XMLHttpRequestfetch而不是链接,那么有一些方法可以设置标头,但是您要设置的一些标头是禁止的,因此这也不起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM