Search code examples
jqueryamazon-web-servicesamazon-s3mime-typesjplayer

Amazon Cloudhosting and JPlayer


I'm so confused with amazon's cloud hosting slash getting jplayer to work. I've tested their player (no deviation in html from the demos) on video files hosted on dropbox and it worked fine, except the bandwidth was too slow for my needs. I've tried replacing dropbox urls with amazon urls with no success.

Here is my JS Code

$(document).ready(function(){
    $("#jquery_jplayer_1").jPlayer({
        ready: function () {
            $(this).jPlayer("setMedia", {
                m4v: "http://media.callserver.dyndns.biz.s3.amazonaws.com/Edited+Original+Intro.mp4",
                ogv: "http://media.callserver.dyndns.biz.s3.amazonaws.com/Edited+Original+Intro.ogv"
            }).jPlayer("play");
        },ended: function (event) {
            $("#next").show();
                window.location.href = "http://callserver.dyndns.biz:90/index.php?action=TestVid";
            },swfPath: "/jQuery.jPlayer.2.0.0",
        supplied: "m4v, ogv"
    });
});

I've setup a bucket called media.callserver.dyndns.biz (my dynamic hostname from dyndns) following one of the tutorials. I did this after 'wunvideos' did not appear to work for a bucket name. I then created a streaming distribution, though i've questioned if i should not. At the same time, the urls that seem to actually work for downloading the file from browser are no combination of urls i can think for my cloudfront distribution. I'm utterly confused as to what to do.


Solution

  • Apologies if you've seen the link already but working from this guide there's a couple of differences with your description:

    • Stick to the download option, not streaming, as it is faster and possibly more reliable
    • Test the Cloudfront URL in your browser to make sure the URL is working
    • Once that's all tested and working, embed it in a player of your choice - the guide uses JWPlayer

    Maybe one of those will help, or at least help narrow the problem