PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Video + File Download Restriction

Common Questions/Problems/Tips. Posted by Administrators & Support Reps.

Video + File Download Restriction

Postby rainleader » April 2nd, 2011, 11:40 pm

Maybe I'm overly ambitious, but shouldn't it be possible to upload a .mov or .mp4 file to the s2Member-files directory and use a video embed plugin (like FV Flowplayer or JW Player) to play it from the s2Member protected URL? If properly configured, this should allow only authenticated users would be allowed to watch the videos. Think that might work?
Last edited by rainleader on April 3rd, 2011, 1:39 am, edited 1 time in total.
User avatar
rainleader
Registered User
Registered User
 
Posts: 22
Joined: March 29, 2011

Re: Video + File Download Restriction

Postby Cristián Lávaque » April 3rd, 2011, 12:00 am

Yes. Some players may have their quirks, but it should be possible.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Video + File Download Restriction

Postby rainleader » April 3rd, 2011, 1:41 am

Well, I gave it a shot using the JW Player plugin for Wordpress and tried with multiple URLs, including the s2member_file_download_key() parameter. It seems like JW Player is just too picky, I might give Flowplayer a shot and will report what happens.
User avatar
rainleader
Registered User
Registered User
 
Posts: 22
Joined: March 29, 2011

Re: Video + File Download Restriction

Postby Jason Caldwell » April 3rd, 2011, 12:30 pm

Yes, this should work; we've run several tests on this.

1. FlowPlayer works fine, nothing special required. [ FlowPlayer ]

2. JW Player. Since the URL to your video is not in a standardized format with s2Member protection applied, JW Player requires an additional parameter: type=video ( and don't forget to urlencode )
Code: Select all
<embed
  flashvars="type=video&file=<?php echo urlencode("http://www.example.com/?s2member_file_download=video.mp4&s2member_file_inline=yes"); ?>"
  allowfullscreen="true"
  allowscripaccess="always"
  src="player.swf"
  width="480"
  height="270"
/>

I should also mention. In all cases, videos/mp3s being played through FlowPlayer/JW Player/etc, should always be served "Inline". So you can just go by the example, and make sure you always pass in: s2member_file_download=your-video.mp4&s2member_file_inline=yes.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to Common Questions/Problems/Tips

Who is online

Users browsing this forum: No registered users and 1 guest

cron