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

Amazon S3 + Query String Authentication


Our videos are hosted on Amazon S3 with private ACL: we use query string authentication to build the URLs.

This works fine: we have a 2 hour time out set on the videos. However, some of our videos are quite long (1 hour), and if somebody pauses the video (for example, an hour) and comes back, the video stops working (presumably because the player uses 206 partial content and the two hour expiration window has expired).

Is there a way, once a user hits "play" that the player just downloads and caches the video all at once? It seemed (and I can't tell if this is Amazon S3 just being slow), the player only downloaded a little bit ahead of the video.

OR is there a way to dynamically read the response returned from the video URL and refresh it?

9 Community Answers

Cooper Reid

JW Player Support Agent  
0 rated :

Hi,
That’s an interesting issue you’re facing. I don’t believe there is a way to force the player to download the entire video. Have you tried Flash mode to see if that tries to download the movie in it’s entirety? One workaround you can do, is to use the onError event handler to show a message or refresh the page if this sort of thing happens:
jwplayer().onError(function() {
resetPage();
});

Best Regards,
Cooper

mark

User  
0 rated :

I don't like what I am hearing. Do you really want to force a 1 hour movie to be progressively pushed in entirety to a customer?
There must better ways to authenticate and achieve your goal with a streaming protocol.

business

User  
0 rated :

Hey Cooper -

That is in essence what we are doing as a workaround, but it's still not an optimal UI experience.

Have not tried the Flash mode, but it's something we'd like to avoid with our audience.

Is the "not forcing a download" a built-in "feature" of the HTML5 video player or something that JWPlayer does for buffering purposes?

Cooper Reid

JW Player Support Agent  
0 rated :

That is simply a feature of HTML5 video tag. MP4s are streamed with partial content requests, so you can seek to any location in the video.
-Cooper

business

User  
0 rated :

Any chance this use case would be more natively handled by JWPlayer in the future? I'm surprised this use case isn't more common: I guess using long ACLed videos on S3 is not very common?

Cooper Reid

JW Player Support Agent  
0 rated :

The only thing we can recommend at this time is to extend the token periods. I can submit this as a feature request to our player engineers -
Cooper

business

User  
0 rated :

Unfortunately due to the nature of these videos, we can't extend it beyond the time limit we have (they are paid videos and our content owners are a bit paranoid about having those URLs out in the wild).

If you could file a feature request for a future version that'd be great.

Cooper Reid

JW Player Support Agent  
0 rated :

Understood, thanks for reporting the issue -
Cooper

bulcar

User  
0 rated :

We are also using Amazon S3. Are you also using the JWPlayer WordPress plugin? Any chance of chatting how your setup is built? We have a similar requirement to protect paid viewing.

Thanks

This question has received the maximum number of answers.