Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Hidding url video using PHP script


Dear JWplayer developpers,

I've search the whole day the support forum without an answer. Currently I can read normal mp4 videos, but I have an error "No playable sources found" when I try to read the video through a PHP url.

My JWplayer .setup :
file: url_stream,
provider: "video",
image: image_player_off,
autostart: false,
width: "100%",
aspectratio: "4:3",
abouttext:abouttext_player,
aboutlink:aboutlink_player

My little PHP script:
header("Accept-Ranges: bytes");
header("Content-type: video/mp4");
header("Content-Length: 24401570");
header("Cache-Control: no-cache, no-store, max-age=0, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Expires: Mon, 07 Jul 2014 00:00:00 GMT");
header("Pragma: no-cache");
header("Content-Transfer-Encoding: binary");
header("Content-Description: File Transfer");
readfile($movie_url);


The "PHP video" is watchable in a browser by the way.
Thank you in advance for any help on this issue :).

9 Community Answers

Ethan Feldman

JW Player Support Agent  
-1 rated :

provider: “video”, is for JW5.

For JW6 it would be:

type: “mp4”,

nikola.cebovic

User  
0 rated :

Thank you for the fast answer. I made the change you suggested but I still have my issue.

I forgot 2 quite important information:

- the video I am trying to watch is on an other domain

- when trying to watch the "PHP video", on the firebug console there is a log which outputs: CAPTIONS([object Object])

Ethan Feldman

JW Player Support Agent  
0 rated :

Please provide a link.

nikola.cebovic

User  
0 rated :

There link is : bit.ly/TwAOSf (shorten for security reason hope you don't mind)

You should click on the following :
- Login
ethan/0000 (=>four zeros)
- S-inema
- TESTING
- ENCRYPTED_VIDEO

There, "Trailer" is a classic mp4 video and "Play" is the same video through the PHP script.

I hope this process is not a burden to you, thank you for your time.

Ethan Feldman

JW Player Support Agent  
0 rated :

Runs fine for me. Firefox 30, Win7. Running in html5 mode.

nikola.cebovic

User  
0 rated :

(We have a premium account, I just forgot to login with that one, I could give you our personnal informations in private if needed).

I took another computer with win7 and FF30 like your setup:
- When I click on Trailer OK (normal behaviour, classic mp4 url)
- When I click on Play NOT OK (failed with the error message, uses a php script)

Ethan Feldman

JW Player Support Agent  
0 rated :

Ah, I see. It looks like the file is not even being requested. Is it possible to have a test page with just the player + the php as the file?

nikola.cebovic

User  
0 rated :

You were right, a "type" attribute was missing.

Now I must forbid the users to see the actual link to prevent the file to be downloaded. Download software can get through that PHP script to get the video. Do you might have an idea to accomplish this?

Ethan Feldman

JW Player Support Agent  
0 rated :

That’s the thing, this request will still be triggered client side. If the client can’t open it, the player won’t be able to either.

This question has received the maximum number of answers.