Community Support Forums — WordPress® ( Users Helping Users ) — 2012-01-16T10:55:26-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2937 2012-01-16T10:55:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60681#p60681 <![CDATA[Re: Video On Overlay + File Download Restriction]]>
Jason Caldwell wrote:
weseoin wrote:My question is: how can I have a start image instead of a blank screen in the video?

Many thanks for the help.

Please check the documentation at Flowplayer for this.
See: http://flowplayer.org/demos/installatio ... image.html


Pardon for not being able to get it, but how can I use the image tag <img /> in the following code?

I tried these instructions, http://flowplayer.org/demos/plugins/str ... frame.html, but couldn't succeed!

Code:
<?php
$config = "{'clip':{'url':'http://example.com/?s2member_file_download=video.mp4&s2member_file_inline=yes','autoPlay':false,'scaling':'orig'}}";
?>
<embed src="flowplayer.swf" flashvars="config=<?php echo rawurlencode($config); ?>" width="100%" height="400" allowfullscreen="true" type="application/x-shockwave-flash" />

Statistics: Posted by weseoin — January 16th, 2012, 10:55 am


]]>
2012-01-16T10:45:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60678#p60678 <![CDATA[Re: Video + File Download Restriction]]>
Jason Caldwell wrote:
In the s2Member documentation (i.e. in your Dashboard), for Advanced Mod Rewrite Linkage, you will see that it's possible to specify the inline directive there as well. See example below please.

Thanks Jason. I should have seen this! :oops:

Statistics: Posted by weseoin — January 16th, 2012, 10:45 am


]]>
2012-01-16T09:01:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60663#p60663 <![CDATA[Re: Video On Overlay + File Download Restriction]]>
weseoin wrote:
My question is: how can I have a start image instead of a blank screen in the video?

Many thanks for the help.
Please check the documentation at Flowplayer for this.
See: http://flowplayer.org/demos/installatio ... image.html

Statistics: Posted by Jason Caldwell — January 16th, 2012, 9:01 am


]]>
2012-01-16T08:58:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60662#p60662 <![CDATA[Re: Video + File Download Restriction]]>
Code:
<!-- flowplayer container -->
    <a id="player" href="http://example.com/wp-content/plugins/s2member-files/s2member-file-inline/video.mp4">
    
        
<!-- some initial content so that player is not loaded upon page load -->
        &nbsp;
    </a> 
SNAG-0013.png

Statistics: Posted by Jason Caldwell — January 16th, 2012, 8:58 am


]]>
2012-01-16T00:56:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60636#p60636 <![CDATA[Re: Video On Overlay + File Download Restriction]]>
Jason Caldwell wrote:
Thanks for this great question.
Based on the examples provided here, for this Overlay script provided by FlowPlayer, see: http://flowplayer.org/demos/tools/overlay.html

All you'd need to do is use s2Member's Advanced Mod Rewrite Linkage in this section of the example.
Code:
    <!-- flowplayer container -->
    <a id="player" href="http://example.com/wp-content/plugins/s2member-files/video.mp4">
    
        
<!-- some initial content so that player is not loaded upon page load -->
        &nbsp;
    </a> 
You will find full details on s2Member's Advanced Mod Rewrite Linkage in your Dashboard, under: s2Member -> Download Options -> Advanced Mod Rewrite Linkage. This method of linking to protected files is recommended when you're dealing with media playback devices.

Thanks Jason for the tip. I'll be trying this out now. I believe that not mentioning '&s2member_file_inline=yes' in the URL will not be an obstacle.

The one problem is how to test whether it's working!! Because, once the video is in the protected directory (s2member-files), the administrator may not be able to test if the whole thing works! Is there any way I can do the testing as administrator?

Jason, I need another help with regards to your post on May 31 last. In that you've given the following code for embedding video with FlowPlayer:

Code:
<?php
$config = "{'clip':{'url':'http://example.com/?s2member_file_download=video.mp4&s2member_file_inline=yes','autoPlay':false,'scaling':'orig'}}";
?>
<embed src="flowplayer.swf" flashvars="config=<?php echo rawurlencode($config); ?>" width="100%" height="400" allowfullscreen="true" type="application/x-shockwave-flash" />

My question is: how can I have a start image instead of a blank screen in the video?

Many thanks for the help.

Statistics: Posted by weseoin — January 16th, 2012, 12:56 am


]]>
2012-01-14T21:20:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60528#p60528 <![CDATA[Re: Video On Overlay + File Download Restriction]]> Thanks for this great question.
weseoin wrote:
Jason Caldwell wrote:With FlowPlayer, all videos require a FlashVar configuration, and with s2Member it's the same.

Jason,

Can you suggest any tips on showing s2member-restricted video with FlowPlayer on an *overlay*? I want to display my videos 960x540, but the space in my WordPress post can accommodate no more than 620 width. This is the reason I need the overlay.

FlowPlayer does give the jquery script for overlay, but I am not sure this will work with s2member download restrictions.

Any help will be greatly appreciated.
Based on the examples provided here, for this Overlay script provided by FlowPlayer, see: http://flowplayer.org/demos/tools/overlay.html

All you'd need to do is use s2Member's Advanced Mod Rewrite Linkage in this section of the example.
Code:
    <!-- flowplayer container -->
    <a id="player" href="http://example.com/wp-content/plugins/s2member-files/video.mp4">
    
        
<!-- some initial content so that player is not loaded upon page load -->
        &nbsp;
    </a> 
You will find full details on s2Member's Advanced Mod Rewrite Linkage in your Dashboard, under: s2Member -> Download Options -> Advanced Mod Rewrite Linkage. This method of linking to protected files is recommended when you're dealing with media playback devices.

Statistics: Posted by Jason Caldwell — January 14th, 2012, 9:20 pm


]]>
2012-01-14T21:11:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60527#p60527 <![CDATA[Re: Video + File Download Restriction]]> I like this solution also. For advanced site owners, this will certainly do the job.
MediocreFred wrote:
Just in case anybody else is looking to include the Download Key in the URL, here's what I did:

Added this to my custom functions.php file:
Code:
function play_audio( $atts ) {
   extract( shortcode_atts( array('audiofile' => '', 'player' => 'AudioPlayer'), $atts ) );
   if ($audiofile != "") {
      $rkey = s2member_file_download_key($audiofile);
      $rfile = "http://www.mydomain.org/wp-content/plugins/s2member-files/s2member-file-inline-yes/s2member-file-download-key-".$rkey."/".$audiofile;
      return jwplayer_tag_callback('[jwplayer config='.$player.' file='.$rfile.']');
   }
   else
      return '';
}
add_shortcode('raudio', 'play_audio');


Within any post or page, I use the shortcode to embed JW Player:
Code:
[raudio audiofile="test.mp3"]


If there's a better/simpler way of doing this, please let me know. If not, hope this helps somebody down the road.

Thanks.

Statistics: Posted by Jason Caldwell — January 14th, 2012, 9:11 pm


]]>
2012-01-14T21:09:00-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60526#p60526 <![CDATA[Re: Video + File Download Restriction]]> So sorry, it looks like I've fallen behind on this thread.
Let me start here by explaining.

MediocreFred wrote:
Continuing the previous post, here is an example...

This works:
Code:
[jwplayer file="http://www.rasika.org/wp-content/plugins/s2member-files/s2member-file-inline-yes/test.mp3"]


This does not:
Code:
[jwplayer file="http://www.rasika.org/wp-content/plugins/s2member-files/s2member-file-inline-yes/s2member-file-download-key-[s2Key file_download='test.mp3' /]/test.mp3"]


How do I generate the key inline?

Thanks.
Correct, this will not work because WordPress can't parse a Shortcode that's embedded into another Shortcode. If you need to generate a File Download Key with s2Member, and place that File Download Key into yet another Shortcode, you will be forced to use the PHP version of s2Member's Download Key generator. So for instance, you might have this...
Code:
[jwplayer file="http://www.rasika.org/wp-content/plugins/s2member-files/s2member-file-inline-yes/s2member-file-download-key-<?php echo s2member_file_download_key("test.mp3"); ?>/test.mp3"]
In order for this to work, you will need to have a PHP Execution plugin installed as well, so that PHP tags <?php ?> are parsed inside your Posts/Pages. See: http://wordpress.org/extend/plugins/exec-php/

Statistics: Posted by Jason Caldwell — January 14th, 2012, 9:09 pm


]]>
2012-01-14T10:34:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60506#p60506 <![CDATA[Re: Video + File Download Restriction]]>
Added this to my custom functions.php file:
Code:
function play_audio( $atts ) {
   extract( shortcode_atts( array('audiofile' => '', 'player' => 'AudioPlayer'), $atts ) );
   if ($audiofile != "") {
      $rkey = s2member_file_download_key($audiofile);
      $rfile = "http://www.mydomain.org/wp-content/plugins/s2member-files/s2member-file-inline-yes/s2member-file-download-key-".$rkey."/".$audiofile;
      return jwplayer_tag_callback('[jwplayer config='.$player.' file='.$rfile.']');
   }
   else
      return '';
}
add_shortcode('raudio', 'play_audio');


Within any post or page, I use the shortcode to embed JW Player:
Code:
[raudio audiofile="test.mp3"]


If there's a better/simpler way of doing this, please let me know. If not, hope this helps somebody down the road.

Thanks.

Statistics: Posted by MediocreFred — January 14th, 2012, 10:34 am


]]>
2012-01-14T05:51:37-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60499#p60499 <![CDATA[Re: Video On Overlay + File Download Restriction]]>
Jason Caldwell wrote:
With FlowPlayer, all videos require a FlashVar configuration, and with s2Member it's the same.

Jason,

Can you suggest any tips on showing s2member-restricted video with FlowPlayer on an *overlay*? I want to display my videos 960x540, but the space in my WordPress post can accommodate no more than 620 width. This is the reason I need the overlay.

FlowPlayer does give the jquery script for overlay, but I am not sure this will work with s2member download restrictions.

Any help will be greatly appreciated.

Statistics: Posted by weseoin — January 14th, 2012, 5:51 am


]]>
2012-01-13T17:54:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60458#p60458 <![CDATA[Re: Video + File Download Restriction]]>
For both free and paid, I only want content played embedded. I'd like to block downloads - at least for free members.

The URLs you have won't block people from sharing the url. That is the reason why I specifically want to use the download-key feature.

I have the jwplayer shortcode working without the key. All I want is a way to include the dynamically generated key as described in the Rewrite URL documentation.

Thanks.

Statistics: Posted by MediocreFred — January 13th, 2012, 5:54 pm


]]>
2012-01-13T17:12:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60457#p60457 <![CDATA[Re: Video + File Download Restriction]]> http://www.yourdomain.com/wp/?s2member_ ... /video.mp4

For premium videos
http://www.yourdomain.com/wp/?s2member_ ... /video.mp4

Now you do not need to include the JWPlayer as you are not embedding the video right you want them to download it ?

So the premium videos would be under the protected level and the free ones would not.

You can also use
"http://mywebsite.com/s2t/wp-content/plugins/s2member-files/s2member-file-inline/access-s2member-level2/videofile.mp4"

Statistics: Posted by merchant — January 13th, 2012, 5:12 pm


]]>
2012-01-13T09:57:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60436#p60436 <![CDATA[Re: Video + File Download Restriction]]>
This works:
Code:
[jwplayer file="http://www.rasika.org/wp-content/plugins/s2member-files/s2member-file-inline-yes/test.mp3"]


This does not:
Code:
[jwplayer file="http://www.rasika.org/wp-content/plugins/s2member-files/s2member-file-inline-yes/s2member-file-download-key-[s2Key file_download='test.mp3' /]/test.mp3"]


How do I generate the key inline?

Thanks.

Statistics: Posted by MediocreFred — January 13th, 2012, 9:57 am


]]>
2012-01-13T08:21:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60427#p60427 <![CDATA[Re: Video + File Download Restriction]]>
The example I'd like to use is this -
Code:
... /wp-content/plugins/s2member-files/s2member-file-inline-yes/s2member-file-download-key-xS54df5ER4d5x/example-file.zip


How do I include the equivalent of
Code:
<?php echo s2member_file_download_key("example-file.zip"); ?>
in place of "xS54df5ER4d5x" in the above example?

My goal is to allow members (some free, some paid) to play/watch audio and video clips but not be able to broadcast the links willy-nilly.

Thanks.

Statistics: Posted by MediocreFred — January 13th, 2012, 8:21 am


]]>
2012-01-09T18:18:12-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60064#p60064 <![CDATA[Re: Video + File Download Restriction]]> Also does it mean that the method we have discussed for playlists (advanced mod/re-write linkage) will that work with s2Clean? Is the external media url method and the playlist creation available in s2Clean?
I take it subsequent upgrades will be seamless as Wordpress is upgraded so will your theme that way I rather bite the bullet now and not have to rework much more later.
I take it most of the wordpress plugins will also work with your theme?

Statistics: Posted by merchant — January 9th, 2012, 6:18 pm


]]>
2012-01-09T07:08:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60031#p60031 <![CDATA[Re: Video + File Download Restriction]]> http://wordpress.org/extend/plugins/jw- ... wordpress/
I've used this in the past and it works nicely.

The s2Clean Theme does not support playlists.

Converting to the s2Clean theme will likely cause you extra work. A theme dictates the presentation of your content. If you've already started with another theme, I would stick with it to reduce your workload.

Statistics: Posted by Jason Caldwell — January 9th, 2012, 7:08 am


]]>
2012-01-09T06:58:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60030#p60030 <![CDATA[Re: Video + File Download Restriction]]> Now if I have created my site using a non-s2CleanTheme can I just install it and not have to redo all my work or will I have to significantly redo my work?

Statistics: Posted by merchant — January 9th, 2012, 6:58 am


]]>
2012-01-09T06:51:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=60029#p60029 <![CDATA[Re: Video + File Download Restriction]]> Thanks for the follow-up.

Yes, the s2Clean theme includes a Shortcode [WS-T-Video /], which makes it possible to quickly embed videos into a Post/Page or even into a Text Widget. This includes the ability to embed videos protected by s2Member. However, the s2Clean theme is not required to accomplish this.

Example #1 with the s2Clean Theme.
Code:
[WS-T-Video src="http://example.com/wp-content/plugins/s2member-files/s2member-file-inline/video.mp4" width="100%" height="400" autostart="false" /]

Example #2 with JW Player.
Code:
<div id="jw-container">JW Player® appears here.</div>
<
script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
<script type="text/javascript">
    jwplayer("jw-container").setup({modes: /* JW Player®. */
    [
        /* First try psuedo-streaming with Flash® player. */
        {type: "flash", provider: "http", src: "/jwplayer/player.swf",
            config: {file: "/wp-content/plugins/s2member-files/s2member-file-inline/video.mp4"}},
            /* Shortcode equivalent: [s2File rewrite="yes" inline="yes" download="video.mp4" /] */
    
        /* Else, try an HTML5 video tag. */
        {type: "html5", provider: "video",
            config: {file: "/wp-content/plugins/s2member-files/s2member-file-inline/video.mp4"}},
            /* Shortcode equivalent: [s2File rewrite="yes" inline="yes" download="video.mp4" /] */
    
        /* Else, this is a safe fallback. */
        {type: "download", /* Download the file. */
            config: {file: "/wp-content/plugins/s2member-files/s2member-file-inline/video.mp4"}}
            /* Shortcode equivalent: [s2File rewrite="yes" inline="yes" download="video.mp4" /] */
    ],
    /* Set video dimensions. */ width: 480, height: 270
    });
</script>
Integration with JW Player can be simplified with a Shortcode, by getting this plugin. See: http://wordpress.org/extend/plugins/jw- ... wordpress/

Of course, you can present protected videos in other players also. Just be sure to use the advanced Mod Rewrite method of linking to protected files, because the ?s2member_file_download=video.mp4 method causes trouble in some media playback devices. Using the direct Mod Rewrite Linkage (made possible by s2Member), will avoid these issues. This is documented in your Dashboard. For further details, I would suggest these sections of your Dashboard with s2Member installed.

s2Member -> Download Options -> JW Player Examples
s2Member -> Download Options -> Advanced Mod Rewrite Linkage

Statistics: Posted by Jason Caldwell — January 9th, 2012, 6:51 am


]]>
2012-01-07T16:42:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=59948#p59948 <![CDATA[Re: Video + File Download Restriction]]> You mention that if you use s2CleanTheme then the embedding of code for playing videos in protected directories is very straightforward.
Is that true? I have not installed the s2CleanTheme.
I am struggling to get the videos to play on using the JWPlayer plugin. I have done all the research on this and other posts and tried several options with no luck. It says access denied.
I am trying to do
1. Embed the video inline for viewing and
2. Want to display a playlist for inline viewing.

Want to store the videos in the protected directories of s2member by different levels.
Any help you can provide would be appreciated.
Is there a video that shows us how to do this?
Will this problem be solved if I use the CleanTheme?

Statistics: Posted by merchant — January 7th, 2012, 4:42 pm


]]>
2011-12-05T21:22:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=54617#p54617 <![CDATA[Re: Video + File Download Restriction]]>
Two additional Video + File Download questions:

-Can video + file download restrictions be used with playlists too, and if so, what should the folder structure look like...where should my playlist file go and where should my video folder go?

-If we are adding .mp4 to the "okay" list, what's stopping someone from directly downloading the mp4 files? I only want members streaming mp4s, not downloading them.

This thread has been a big help. Thanks!

Statistics: Posted by tripleaaadelay — December 5th, 2011, 9:22 pm


]]>
2011-09-23T12:12:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=38971#p38971 <![CDATA[Re: Video + File Download Restriction]]>
When I insert this code into the address bar, the video plays on it's own as it should even if I'm not logged in:

http://tamu.louderlearn.com/?s2member_f ... nload_key=<?php echo s2member_file_download_key("Math141_Session3_091311.mp4"); ?>

But then when I put that code into the jwplayer shortcode below, the video doesn't play. I don't get any messages related to this, the jwplayer just keeps spinning as if it wants to play a video, but it's not.

[jwplayer file=http://tamu.louderlearn.com/?s2member_file_download=Math141_Session3_091311.mp4&s2member_file_download_key=<?php echo s2member_file_download_key("Math141_Session3_091311.mp4"); ?>]

Not sure why it doesn't want to play. You mentioned download restriction settings. What should they be at? If you want to check the code from my page, here's what it looks like:

<script type="text/javascript">jwplayer("jwplayer-5").setup({flashplayer: "http://tamu.louderlearn.com/wp-content/uploads/jw-player-plugin-for-wordpress/player/player.swf", width: "640", height: "400", controlbar: "bottom", "file": "http://tamu.louderlearn.com/?s2member_file_download=Math141_Session3_091311.mp4&#038;s2member_file_download_key=df831c51920006052ba300766449e992", "wmode": "opaque", events: {}, config: "http://tamu.louderlearn.com/wp-content/uploads/jw-player-plugin-for-wordpress/configs/tutorplayer.xml"});</script>

Statistics: Posted by alouder — September 23rd, 2011, 12:12 pm


]]>
2011-09-23T07:45:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=38961#p38961 <![CDATA[Re: Video + File Download Restriction]]>

The last video you have on that page is missing your domain name but I checked it. it sends you to the membership option page.

<script type="text/javascript">jwplayer("jwplayer-9").setup({flashplayer: "http://tamu.louderlearn.com/wp-content/uploads/jw-player-plugin-for-wordpress/player/player.swf", width: "640", height: "400", controlbar: "bottom", "file": "Math141_Session3_091311.mp4&#038;s2member_file_download_key=6f5299c3ff2665dda597dbfb444ec585", "wmode": "opaque", events: {}, config: "http://tamu.louderlearn.com/wp-content/uploads/jw-player-plugin-for-wordpress/configs/Tutor Player.xml"});</script>

Sam

Statistics: Posted by drbyte — September 23rd, 2011, 7:45 am


]]>
2011-09-23T01:33:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=38955#p38955 <![CDATA[Re: Video + File Download Restriction]]> Statistics: Posted by alouder — September 23rd, 2011, 1:33 am


]]>
2011-09-23T00:57:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=38954#p38954 <![CDATA[Re: Video + File Download Restriction]]>
[jwplayer config=”Tutor Player” file=”http://tamu.louderlearn.com/?s2member_file_download=Math141_Session3_091311.mp4&s2member_file_download_key=[s2Key file_download="Math141_Session3_091311.mp4”/]]

Statistics: Posted by drbyte — September 23rd, 2011, 12:57 am


]]>
2011-09-23T00:50:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2937&p=38953#p38953 <![CDATA[Re: Video + File Download Restriction]]>
[jwplayer file=http://tamu.louderlearn.com/?s2member_file_download=Math141_Session3_091311.mp4&s2member_file_download_key=<?php echo s2member_file_download_key(Math141_Session3_091311.mp4); ?>]

Statistics: Posted by alouder — September 23rd, 2011, 12:50 am


]]>