Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change HTTP Referer #1

Closed
carbos10 opened this issue Jan 8, 2015 · 4 comments
Closed

Change HTTP Referer #1

carbos10 opened this issue Jan 8, 2015 · 4 comments
Labels

Comments

@carbos10
Copy link

carbos10 commented Jan 8, 2015

My player use Media Source Extensions, i would change the Headers (Referer) to a external video , how i can do it? ( i've asked and people tell me, i can change the Headers only with MSE)

@heff
Copy link

heff commented Jan 9, 2015

The only reason MSE would make that possible is because using MSE requires you to make the XMLHttpRequest to fetch the video file data yourself, and so you could change the headers of your own XMLHttpRequest. However if you're just trying to play back an MP4 file and change the headers, using MSE would be overkill and would take a ton of work.

If the server that hosts the video file you're trying to play is blocking referrers other than their own domain, then they probably don't want you playing their content on another site and you shouldn't be trying to. Otherwise if you have a legitimate reason for accessing the content, your best be would be to download the video and host it on a sever you control.

(I think this issue can be closed)

@carbos10
Copy link
Author

carbos10 commented Jan 9, 2015

i can't download video, because i don't have enough space...
I've tried setHeaderRequest when i do the XMLHttpRequest, but it doesn't change and the creators of the webplayer tell me for do it, i must see the Media Source Extensions...
So, there are method for change header requestion?

@acolwell
Copy link
Contributor

acolwell commented Jan 9, 2015

Media Source Extensions is not involved with fetching the video data. That is up to the web application and is usually achieved via XMLHttpRequest as @heff says. Changing certain headers in an XMLHttpRequest is controlled by CORS. Look at the XMLHttpRequest & CORS specs to figure out whether they will let you change the Referer. My guess is that they won't, but you should double check.

@acolwell
Copy link
Contributor

acolwell commented Jan 9, 2015

Closing this issue since it isn't a problem with the MSE spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants