Thanks for the quick response.
I am wondering the benefits of using the example code provided by S2member Download Options (JW Player® ( RTMP streaming MP4, via s2Member’s Amazon® S3/CloudFront integration) VERSUS the JW shortcode that comes with the JWPlayer WordPress plugn. Both work, but JW Player has more control of the player & is much easier for my client to add themselves of course. Both of the codes I use are below.
<?php
// Configuration.
$s2_jw_config["jwplayer"] = "/wp-content/uploads/jw-player-plugin-for-wordpress/player/"; // Relative URL path to JW Player files directory.
$s2_jw_config["mp4_video_file_name"] = "video.mp4"; // Name of your MP4 test file.
// Don't edit anything else below unless you know what you're doing.
?>
<div id="jw-container">JW Player® appears here.</div>
<script type="text/javascript" src="<?php echo $s2_jw_config["jwplayer"]; ?>jwplayer.js"></script>
<?php /* A direct URL to the RTMP source; counting the file against the current User in real-time. */
$cfg = array ("file_download" => $s2_jw_config["mp4_video_file_name"], "url_to_storage_source" => true, "count_against_user" => true); ?>
<?php /* API Function `s2member_file_download_url()` returns false if access is denied to the current User. */
if (($mp4 = s2member_file_download_url ($cfg, "get-streamer-array"))) { ?>
<script type="text/javascript">
jwplayer("jw-container").setup({modes: /* JW Player®. */
[
/* First try real-time streaming with Flash® player. */
{type: "flash", provider: "rtmp", src: "<?php echo $s2_jw_config["jwplayer"]; ?>player.swf",
config: {streamer: "<?php echo $mp4["streamer"]; ?>", file: "<?php echo $mp4["file"]; ?>"}},
/* Else, try an HTML5 video tag. */
{type: "html5", provider: "video",
config: {file: "<?php echo $mp4["url"]; ?>"}},
/* Else, this is a safe fallback. */
{type: "download", /* Download the file. */
config: {file: "<?php echo $mp4["url"]; ?>"}}
],
/* Set video dimensions. */ width: 480, height: 270
});
</script>
<?php } else /* Access is denied to the current User. */ { ?>
Sorry, you do NOT have access to this file.
<?php } ?>
[jwplayer mediaid="1546"]
JW shortode:
[jwplayer mediaid="1542"]