latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

File Download Restrictions with subfolders?

Home Forums Community Forum File Download Restrictions with subfolders?

This topic contains 10 replies, has 3 voices. Last updated by  Peggy Duncan 4 years, 8 months ago.

Topic Author Topic
Posted: Tuesday Apr 10th, 2012 at 12:46 pm #10474

Hi,

I am using JW player to play video located on my server.

1.
Inline File Extensions are set to: pdf,mp4

Can I create a subfolder for my videos inside the File Download Restrictions folder?
/wp-content/plugins/s2member-files

This would read:
[jwplayer config=”My_player_settings” file=”http://mydomain.com/?s2member_file_download=subfolder/myvideo.mp4″

2.
Also another problem with files I put under s2member-files, once video is started, user cannot go back to beginning or move backward or forward using the progress bar. I do not have this issue when video files are uploaded under WP media library.

Thanks for taking the time to reply

List Of Topic Replies

Viewing 10 replies - 1 through 10 (of 10 total)
Author Replies
Author Replies
Posted: Wednesday Apr 11th, 2012 at 10:45 am #10555

I’ll follow this support ticket for this same issue.

Posted: Wednesday Apr 11th, 2012 at 10:57 am #10556
David Welch
Username: dwbiz05

1. Yes you can create subfolders.

2. I don’t know if this will work, because it depends on whether jwplayer will parse shortcode, unless you are creating your file access string using the php method. usually to access a file in the secured folder you would do something like this:

<a href="[s2File download='subfolder/myvideo.mp4' skip_confirmation='yes' download_key='yes']">The file name</a>

So, since you are using the shortcode method, the way it should work is something like this:

[jwplayer config="My_player_settings" file="[s2File download='subfolder/myvideo.mp4' skip_confirmation='yes' download_key='yes']"]

The php version is a little more work if jwplayer doesn’t parse shortcodes.

Without knowing much about jwplayer, that should be how to play files that are in the protected folder. I’m not sure about the user’s ability to move through the file though.

Hope that helps.

Dave

Posted: Monday Apr 16th, 2012 at 6:27 pm #10943

Dave,

It looks like JW Player does NOT like S2Member shortcode since what JW Player use is not a true shorcode but rather a filter (according to their forum).

When I use wordpress library with a long URL it works fine.
[jwplayer config=”Training_Video” file=”http://complianceaid.pro/wp-content/uploads/2012/04/New_Employee_Training_Insurance_Still_v3.mp4&#8243;

I tried S2Member long URL WITHOUT success.
Here is what I did:
1.
[jwplayer config=”Training_Video” file=”http://complianceaid.pro/?s2member_file_download=New_Employee_Training_Banking.mp4&#8243;
2.
[jwplayer config=”Training_Video” file=”http://complianceaid.pro/?s2member_file_download=New_Employee_Training_Banking.mp4&s2member_skip_confirmation&#8221;
3.
[jwplayer config=”Training_Video” file=”http://complianceaid.pro/?s2member_file_download=New_Employee_Training_Banking.mp4&s2member_skip_confirmation&s2member_file_inline=yes&#8221;

Each time I get the error message:
Task Queue failed at step 5: Playlist could not be loaded: Playlist file did not contain a valid playlist.

I think something is missing, could it be the download key ???

Also in S2Member backend I read something pertaining to installing “PHP Execution” Do I need to do that?

Thanks again for taking to time to assist me.

Posted: Monday Apr 16th, 2012 at 8:57 pm #10955

I’m using s2 Member, and I use subfolders because I like to keep everything organized.

For the video:
‘file’: ‘wlwpart2/wlw-2-4-picphotoalbumsplugins.mp4’,

For the static image representing my video:
‘image’: ‘/wp-content/uploads/thumbnailimagewlw2.jpg’,

Michelle said “Also in S2Member backend I read something pertaining to installing “PHP Execution” Do I need to do that?”
I did EVERYthing exactly the way they explained it although I didn’t understand what a lot of it was. But everything works as it should on my site.

Posted: Tuesday Apr 17th, 2012 at 12:59 pm #11016

Peggy,

Thank you for your feedback.

Are you using short code or long codes?
Can you give me an example of what your code looks like?

Thanks

Posted: Tuesday Apr 17th, 2012 at 1:20 pm #11020

Peggy,

One more question.
Are you using JW Player wordpress plugin as part of your set up?

Thanks

Posted: Tuesday Apr 17th, 2012 at 2:21 pm #11026

Hi Michelle,

I’m not using the JW Player plugin. I’m using long code. Still can’t believe I figured all this out because I’m not a coder. The experts on this site are great.

This code is for a playlist. I have several videos that make up the tutorial. They all line up below the main video. The user clicks the one they want to move to the main window.

I stream from Amazon s3 so that’s what the rtmp info is for. You would replace myamazon.cloudfront with your info. I’m not using the HTML5 fallback. My videos will only play using Flash (for more security because I have a membership Website).

On the video folders: The first few videos are not saved in a subfolder so you’ll notice a different path. Saving inside a subfolder works just fine.

‘file’: ‘wlw-1-configure.mp4’, (no subfolder)
‘file’: ‘wlwpart2/wlw-2-1-editposts.mp4’, (subfolder)

Hope this helps.

Sorry, Videos will not show on iPad or iPhone
jwplayer(‘jwplayer’).setup({
‘flashplayer’: ‘http://www.thedbi.com/jwplayer/player.swf&#8217;,
‘id’: ‘jwplayer’,
‘width’: ‘430’, ‘height’: ‘460’,
‘controlbar’: ‘bottom’,
‘dock’: ‘false’,
‘playlist.position’: ‘bottom’,
‘playlist.size’: ‘260’,
‘playlist’: [
{
‘file’: ‘wlw-1-configure.mp4’,
‘title’: ‘Configure After Downloading’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://myamazon.cloudfront.net/cfx/st’,
‘image’: ‘/wp-content/uploads/thumbnailimagewlw1.jpg’,
‘author’: ‘Peggy Duncan’,
‘duration’: ’05:57′,
‘description’: ‘Setup, Languages, Spelling’
},
{
‘file’: ‘wlw-2-screenexploreopts.mp4’,
‘title’: ‘Explore Screen and Options’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://myamazon.cloudfront.net/cfx/st’,
‘image’: ‘/wp-content/uploads/thumbnailimagewlw1.jpg’,
‘author’: ‘Peggy Duncan’,
‘duration’: ’04:10′,
‘description’: ‘Explore the Ribbon and Options’
},
{
‘file’: ‘wlw-3-createpost.mp4’,
‘title’: ‘Create a Post’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://myamazon.cloudfront.net/cfx/st’,
‘image’: ‘/wp-content/uploads/thumbnailimagewlw1.jpg’,
‘author’: ‘Peggy Duncan’,
‘duration’: ’03:56′,
‘description’: ‘Posts, Tags, Categories, Links’
},
{
‘file’: ‘wlw-4-pictures.mp4’,
‘title’: ‘Working with Pictures’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://myamazon.cloudfront.net/cfx/st’,
‘image’: ‘/wp-content/uploads/thumbnailimagewlw1.jpg’,
‘author’: ‘Peggy Duncan’,
‘duration’: ’03:56′,
‘description’: ‘Insert, Crop, Resize, Shadows, more’
},
{
‘file’: ‘wlw-5-videos.mp4’,
‘title’: ‘Working with Videos’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://myamazon.cloudfront.net/cfx/st’,
‘image’: ‘/wp-content/uploads/thumbnailimagewlw1.jpg’,
‘author’: ‘Peggy Duncan’,
‘duration’: ’06:36′,
‘description’: ‘Insert from Computer, URL, YouTube’
},
{
‘file’: ‘wlw-6-publish.mp4’,
‘title’: ‘Publishing Drafts and Finals’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://myamazon.cloudfront.net/cfx/st’,
‘image’: ‘/wp-content/uploads/thumbnailimagewlw1.jpg’,
‘author’: ‘Peggy Duncan’,
‘duration’: ’01:30′,
‘description’: ‘Publish, Set Date, Drafts’
},
{
‘file’: ‘wlw-7-changetitle.mp4’,
‘title’: ‘Changing Titles After Publish’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://myamazon.cloudfront.net/cfx/st’,
‘image’: ‘/wp-content/uploads/thumbnailimagewlw1.jpg’,
‘author’: ‘Peggy Duncan’,
‘duration’: ’01:27′,
‘description’: ‘Changing Titles (after publishing)’
},
{
‘file’: ‘wlwpart2/wlw-2-1-editposts.mp4’,
‘title’: ‘Edit Posts’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://myamazon.cloudfront.net/cfx/st’,
‘image’: ‘/wp-content/uploads/thumbnailimagewlw2.jpg’,
‘author’: ‘Peggy Duncan’,
‘duration’: ’01:17′,
‘description’: ‘Edit Posts After Published or Drafts’
},
{
‘file’: ‘wlwpart2/wlw-2-2-createpages.mp4’,
‘title’: ‘Create Pages’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://myamazon.cloudfront.net/cfx/st’,
‘image’: ‘/wp-content/uploads/thumbnailimagewlw2.jpg’,
‘author’: ‘Peggy Duncan’,
‘duration’: ’01:01′,
‘description’: ‘Create Pages that Create Tabs on Site’
},
{
‘file’: ‘wlwpart2/wlw-2-3-autolinking.mp4’,
‘title’: ‘Auto Linking’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://myamazon.cloudfront.net/cfx/st’,
‘image’: ‘/wp-content/uploads/thumbnailimagewlw2.jpg’,
‘author’: ‘Peggy Duncan’,
‘duration’: ’03:41′,
‘description’: ‘Auto Linking and Save Hyperlinks to Use Later’
},
{
‘file’: ‘wlwpart2/wlw-2-4-picphotoalbumsplugins.mp4’,
‘title’: ‘Create Photo Album and Flickr Plugin’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://myamazon.cloudfront.net/cfx/st’,
‘image’: ‘/wp-content/uploads/thumbnailimagewlw2.jpg’,
‘author’: ‘Peggy Duncan’,
‘duration’: ’08:52′,
‘description’: ‘Create Photo Albums and Install Flickr Plugin with Picture Properties’
},
{
‘file’: ‘wlwpart2/wlw-2-5-quickaccessbar.mp4’,
‘title’: ‘Quick Access Toolbar’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://myamazon.cloudfront.net/cfx/st’,
‘image’: ‘/wp-content/uploads/thumbnailimagewlw2.jpg’,
‘author’: ‘Peggy Duncan’,
‘duration’: ’00:57′,
‘description’: ‘Customize Quick Access Toolbar’
}
]
});

Posted: Tuesday Apr 17th, 2012 at 2:24 pm #11027

Michelle, Don’t know why, but my beginning and ending code wouldn’t reproduce in the post.

Posted: Tuesday Apr 17th, 2012 at 5:07 pm #11036

Peggy,

Thanks for your assistance.

I ended up in another direction.

1. S2Members users should aware that the JW Player WordPress plug-in is NOT compatible with S2Member.

2. Code Sample provided with S2Member under Download Option > JW Player® & RTMP Protocol Examples > JW Player® ( MP4 file, via Rewrite URLs. Amazon® S3/CloudFront NOT required ) is NOT compatible with version JW Player 5.9

3. Here is how I made it work.

3.1 Download the current version of JW Player from their site http://www.longtailvideo.com/players
3.2 After unzipping the file create a folder jwplayer on my computer.
3.3 Drop the files jwplayer.js and player.swf into jwplayer folder create in step 3.2
3.4 Upload folder jwplayer folder on your server. Inside httpdocs folder.
3.5 Set files permissions at 644
3.6 Upload your file in the folder s2member-files
3.7 Optionally you may create sub-directory to keep all organized.
3.8 On your page or post paste the following code:


<div id='player'>Your video should load shortly. If it does not load update your flash player or update your browser.</div>
 
 <script type='text/javascript' src='/jwplayer/jwplayer.js'></script>
 
 <script type='text/javascript'>
   jwplayer('player').setup({
   	'flashplayer': 	'/jwplayer/player.swf',
   	'width':	'634',
   	'height':	'476',
   	'image':	'/wp-content/plugins/s2member-files/video/my-first-frame-image.png',
   	'file':		'[s2File rewrite="yes" inline="yes" download_key="yes" download="video/myvideo.mp4" /]'
   });
 </script>

3.9 Just correct the width, height, image and file. Note I am using a sub-directory named “video” download=”video/…” if you use another sub-directory name replace it there. If you do not use any sub-directory simply delete video/
4. Enjoy! I just save you 2 days of sweat.

Posted: Tuesday Apr 17th, 2012 at 5:39 pm #11044

Michelle, I JUST set all this up last week and didn’t have any issues with s2member working with the JW Player…I guess it was because I created the code from scratch and didn’t use any from s2member.

Glad everything worked out for you.

Viewing 10 replies - 1 through 10 (of 10 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.