1

I came up with some weird stuff that I haven't seen before.

I used <source type="video/webm" src="test.php">

instead of <source type="video/webm" src="example.webm">

...Test.php file containing only this line of code:

header("Location: https://www.example.com/example.webm");

and it works..

Is this normal or maybe has some downside for the video/loading/flash(or browser support), is there actually any difference using test.php or example.webm directly? I am so confused because what I know... this is too good to be true, and too simple. Would appreciate any comment/pointer...

4
  • 1
    All that script is doing is sending a redirect to the browser. The browser follows the location to the .webm and loads it. The video is not being proxied through your script, nor is the actual location of the .webm hidden from the user. Commented Aug 15, 2017 at 22:53
  • Thank you... if it is ok to use test.php the .webm file is not visible inside the code. So I should be able to add some sort of temp token, this would be the idea here. Commented Aug 15, 2017 at 23:03
  • Oh.. at least I know now that this approach is pointless. Commented Aug 16, 2017 at 1:18
  • @Tom Your comment re:adding a token is correct. Your comment that it is pointless is not. Commented Aug 17, 2017 at 22:09

1 Answer 1

0

It is ok to use. The browser just looks for "https://www.example.com/example.webm" when accessing test.php, so the difference in load is very small. (as small as it takes your browser to be redirected).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.