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.
<?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
Statistics: Posted by weseoin — January 16th, 2012, 10:45 am
Statistics: Posted by Jason Caldwell — January 16th, 2012, 9:01 am
<!-- 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 -->
</a>
Statistics: Posted by Jason Caldwell — January 16th, 2012, 8:58 am
<!-- 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 -->
</a>
<?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, 12:56 am
Based on the examples provided here, for this Overlay script provided by FlowPlayer, see: http://flowplayer.org/demos/tools/overlay.htmlweseoin 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.
<!-- 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 -->
</a>
Statistics: Posted by Jason Caldwell — January 14th, 2012, 9:20 pm
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
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...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.
[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"]
Statistics: Posted by Jason Caldwell — January 14th, 2012, 9:09 pm
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');
[raudio audiofile="test.mp3"]
Statistics: Posted by MediocreFred — January 14th, 2012, 10:34 am
Statistics: Posted by weseoin — January 14th, 2012, 5:51 am
Statistics: Posted by MediocreFred — January 13th, 2012, 5:54 pm
Statistics: Posted by merchant — January 13th, 2012, 5:12 pm
[jwplayer file="http://www.rasika.org/wp-content/plugins/s2member-files/s2member-file-inline-yes/test.mp3"]
[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"]
Statistics: Posted by MediocreFred — January 13th, 2012, 9:57 am
... /wp-content/plugins/s2member-files/s2member-file-inline-yes/s2member-file-download-key-xS54df5ER4d5x/example-file.zip
<?php echo s2member_file_download_key("example-file.zip"); ?>
Statistics: Posted by MediocreFred — January 13th, 2012, 8:21 am
Statistics: Posted by merchant — January 9th, 2012, 6:18 pm
Statistics: Posted by Jason Caldwell — January 9th, 2012, 7:08 am
Statistics: Posted by merchant — January 9th, 2012, 6:58 am
[WS-T-Video src="http://example.com/wp-content/plugins/s2member-files/s2member-file-inline/video.mp4" width="100%" height="400" autostart="false" /]
<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>
Statistics: Posted by Jason Caldwell — January 9th, 2012, 6:51 am
Statistics: Posted by merchant — January 7th, 2012, 4:42 pm
Statistics: Posted by tripleaaadelay — December 5th, 2011, 9:22 pm
Statistics: Posted by alouder — September 23rd, 2011, 12:12 pm
Statistics: Posted by drbyte — September 23rd, 2011, 7:45 am
Statistics: Posted by drbyte — September 23rd, 2011, 12:57 am
Statistics: Posted by alouder — September 23rd, 2011, 12:50 am