Foliovision › Forums › FV Player › Troubleshooting › FV Flowplayer Default Expiry Time isn’t working no matter what I set it to.
-

I am using FV Flowplayer with Amazon S3 video content in a WordPress Multisite environment. The video is playing properly, but the default expiry time isn’t working no matter what I set it to. It doesn’t matter if I have “forced” selected or not. I have tried on ie, firefox, chrome browsers. Is there something I am not understanding? I want to prevent users from reusing the link or downloading the video.
Also, do you have a quick example of how to use the filter “fv_flowplayer_amazon_expires”?
-
-

Hello rayzorg,
the minimal expiration time is 900 seconds (15 minutes). This can be changed using fv_flowplayer_amazon_expires filter. It works as any other WordPress filter.
Here’s a code which changes the expiration to 10 minutes for all videos: https://gist.github.com/foliovision/3dc5db291f0216df2eb7
Thanks,
Martin
Hey Martin,
Thank you for your info regarding S3 Video url expiry. I tested the filter on my localhost multisite wordpress install and it worked perfectly. The only issue I am having is when I implemented it on hosted server, the expiry seems to stay the same even when I leave a wordpress video page and reopen that same page. The expiry seems to stay the same until I log out and log back in. For instance, below are the “access denied” responses from a wordpress video page that I tried running, then I closed the page and reopened it again. The responses have the same expiry. I was thinking it might be wordfence cache but we hadn’t implemented that yet.
<Error>
AccessDenied
<Message>Request has expired</Message>
<X-Amz-Expires>10</X-Amz-Expires>
<Expires>2015-03-26T21:02:29Z</Expires>
<ServerTime>2015-03-26T21:03:01Z</ServerTime>
<RequestId>157A2B58D6FC2FF3</RequestId>
<HostId>
8QTAiQK0Q8Fof/fQvxKYENw04Gf2TOgxOmmYgQxccD66dWIbufLGw0087BGDQLD3
</HostId>
</Error>AccessDenied
<Message>Request has expired</Message>
<X-Amz-Expires>10</X-Amz-Expires>
<Expires>2015-03-26T21:02:29Z</Expires>
<ServerTime>2015-03-26T21:23:50Z</ServerTime>
<RequestId>AD228F279D0A3718</RequestId>
<HostId>
CDsv2OYGzh4cb5DH3x0tzjyYPUq3eK0LA28eCqgZ4OywpCAGL4iN///wySXunI5a
</HostId>
</Error>Thanx
Ray
Hello rayzorg,
check if your WordPress pages are served with the Expires or Cache control HTTP headers.
If you use a WP cache plugin (or any caching mechanism which might cause the links in HTML to expire), you need to force set the default expiry time: https://foliovision.com/player/secure-amazon-s3-guide#wp-cache
If you buy our license, you will get FV Player Pro extension plugin which lets you use CloudFront signed URLs. These are generated on play – so the issue with HTML caching is solved that way.
Thanks,
Martin
Hi Raylene,
You should set your S3 protected content expiry settings in the FV Player settings page (under Amazon S3 Protected Content).
Presumably as it’s protected content you might want to leave our default of 20 minutes in there (if the content is longer we allow longer expiry times automatically).
W3 Total Cache affects your S3 Protected Content as users might get old link if they get cached HTML. So set it to more than 2 hours which you have for W3 Total Cache HTML cache timeout. Or lower that to achieve better protection.
Let us know how it goes.
Making the web work for you, Alec

Hi Raylene,
Try setting the default timeout value higher (say 60 minutes). We have our own set much higher. We’re not that worried about piracy and I’m not sure a short timeout number makes much of a difference anyway – with S3 a pirate can download your whole video within whatever window you give. You only inconvenience the honest user who may stop and start your longer video several times before finishing it.
Let us know how if a longer default expiry time works.
Thanks!
Alec

Hello Raylene,
I talked about this with Alec and there was a misunderstanding.
W3 Total Cache (any plugin which caches HTML) affects our Amazon S3 integration.
If the HTML cache timeout is set to 7200 seconds (2 hours), our Amazon S3 timeout needs to be set to that as well + the something extra. Imagine you arrive to a page right before the HTML expires – you might get 2 hours old link – which still needs to work. So it could be 7200 seconds + video length, but our plugin doesn’t do it that way right now.
In our guide we recommend twice as much, just to be safe: https://foliovision.com/player/secure-amazon-s3-guide#wp-cache
Thanks,
Martin