Thanks for getting back to me, Jason.
Update
I prepended the string with the “MP4” extension as shown in this post. I used:
{type: "rtmp", file: "<?php echo $mp4["streamer"]; ?>/mp4:<?php echo $mp4["file"]; ?>"},
But alas, no change. I’m still getting the Error loading stream: ID not found on server error. I am still using the JW Player 6 code sample, as it appears in the s2Member download settings. I used:
<?php
// Configuration.
$s2_jw_config["jwplayer"] = "/jwplayer/"; // Relative URL path to JW Player files directory.
$s2_jw_config["mp4_video_file_name"] = "how-to-use-this-site.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({
playlist:
[{
sources: /* List all available sources. */
[
{type: "rtmp", file: "<?php echo $mp4["streamer"]; ?>/mp4:<?php echo $mp4["file"]; ?>"},
{type: 'mp4', file: '<?php echo $mp4["url"]; ?>'}
]
}],
primary: 'flash' /* Try Flash® RTMP first, fallback on HTML5 or direct download of MP4 file. */,
width: 480, height: 270 /* Set video dimensions for all sources. */
});
</script>
<?php } else /* Access is denied to the current User. */ { ?>
Sorry, you do NOT have access to this file.
<?php } ?>
Also,
- MP4 file in bucket root, not in a subdirectory
- Fresh WordPress install
- Download link = success
-
This reply was modified 3 years, 12 months ago by Addison Day.
-
This reply was modified 3 years, 12 months ago by Addison Day.