开发者

need to access header attribute on html5 video source url

开发者 https://www.devze.com 2023-01-16 05:17 出处:网络
this is my problem. I have a video tag,开发者_Go百科 whose src is an url. Like this: var video = $(\'video\');///using prototype js framework

this is my problem.

I have a video tag,开发者_Go百科 whose src is an url. Like this:

var video = $('video');    ///using prototype js framework
video.setAttribute('src',
    'aNiceUrl');

The problem is that i need to get some data from the video HTML header, but i dont know how to get it. I need to get the data in the same moment i get the video, cant do more requests to 'aNiceUrl'. The data doesnt have to come in the header, i simply need a way to get it. Any ideas?

BTW, i can see the data with firebug on the net tab, any ideas of how is he doing that?


You can't access any data of what <video> tag is receiving from the given url by the means of Javascript.

Your best option is to include that data in the original page or to make 2 requests (1 for <video> tag, and the other for ajax request).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号