We have Cloudfront integrated with our site and it is working as expected with our videos. When we have the video in the “root” folder of the bucket, it works perfectly (ie: demo_movie.mp4).
We created a sub-folder, since we want to organize the videos a bit and put the exact same movie into that folder. (ie: demo/demo_movie.mp4).
As soon as we change the video location to the sub-folder, when we try to use RTMP only we get an “Error Loading stream: ID Not found on Server”. The MP4 download works perfectly though.
My question is, if we create a subfolder in the bucket (it was done over a week ago), are there any other configuration steps needed to allow that folder to stream as well?
// Configuration.
$s2_jw_config["jwplayer"] = "/jwplayer/"; // Relative URL path to JW Player files directory.
//$s2_jw_config["mp4_video_file_name"] = "demo_movie.mp4"; // Name of your MP4 test file.
$s2_jw_config["mp4_video_file_name"] = "demo/demo_movie.mp4"; // Name of your MP4 test file.
// Don't edit anything else below unless you know what you're doing.
?>
<div id="jw-container"></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 ("downloadkey"=>false,"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(
{
width: '800', height: '450',
playlist:[
{ //image:"/wp-content/uploads/2012/12/4_Single-Arm-Overhead-Extension.png",
sources:
[
{type: "rtmp", file: "<?php echo $mp4["streamer"]; ?>/<?php echo $mp4["file"]; ?>"},
{type: "mp4", file: "<?php echo $mp4["url"]; ?>"}
]
}
]});
</script>
<?php } else /* Access is denied to the current User. */ { ?>
Sorry, you do NOT have access to this file.
<?php } ?>
</center>