NOTE: For help with the JW Player for Flash v5, please refer to the following tutorial: Using Cloudfront
By following this tutorial you will learn how to:
You can either download the player here or use LongTail’s setup wizard to generate the embed code for a customized version of the player.
In order to upload your videos to Amazon S3, you will need two things: an Amazon S3 account and an S3 client to transfer your video files. We suggest using one of the following four S3 clients: Bucket Explorer (Mac + PC), Cyberduck (Mac), CloudBerry S3 Explorer (PC) and S3 Hub (Mac).
After signing up, log into your Amazon S3 account and create a new directory, or bucket, as it's called by Amazon. Name the directory after a subdomain name on your own site (videos.mywebsite.com, for example). We'll use this later on for the DNS redirect.
Next, upload your videos to this directory using your S3 client. When you’re done, set the access properties (aka the ACL file, or permissions) of each video so that everyone can read the files. Now your videos are available under http://videos.mywebsite.com.s3.amazonaws.com.
Once you have uploaded your videos to Amazon S3, Amazon offers a low-cost CDN companion service called Amazon CloudFront, which allows you to optimize the network traffic sent to your users based on their location. Amazon provides documentation on setting up Amazon CloudFront with your Amazon S3-hosted files.
This step is mostly cosmetic and only available to users who have access to the DNS records of their domain (the domain owner should have this, usually). Domain masking, different than domain forwarding, involves the practice of hiding or changing the URL. The reasons are varied, but often involve making the URLs shorter for aesthetic and user-friendly reasons. Compare, for instance, the rather unwieldy http://videos.mywebsite.com.s3.amazonaws.com/myvideo.flv with the more manageable http://videos.mywebsite.com/myvideo.flv. The latter URL, in addition to being easier on the eyes, appears a great deal more professional.
Masking your domain requires access your DNS zone file, either directly or through a management console. (Parallels offers a quick tutorial on changing zone files using their popular Plesk server management software). If you have questions, ask your hosting provider or server administrator for more information on how to accomplish this task.
You will be adding one line to your DNS file, but before you do, keep in mind three important items:
The additional line you will be adding to your zone file should look like this:
Now, you will need to embed the JW Player in your site. If you're unfamiliar with this process, please read our Embedding Flash tutorial, or the excellent documentation of the SWFObject embed JavaScript. For a SWFObject, the embed code should look something like this:
<script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript"> swfobject.registerObject("player", "9.0.0", "expressInstall.swf"); </script>
<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="328" height="200"> <param name="movie" value="player.swf" /> <param name="allowfullscreen" value="true" /> <param name="flashvars" value="file=http://videos.mywebsite.com/myvideo.flv" /> <object type="application/x-shockwave-flash" data="player.swf" width="328" height="200"> <param name="movie" value="player.swf" /> <param name="allowfullscreen" value="true" /> <param name="flashvars" value="file=http://videos.mywebsite.com/myvideo.flv" /> <p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p> </object>
Now that you have videos on your site, you’ll want to customize your player.
You can use LongTail’s AdSolution to run pre-roll, overlay, mid-roll or post-roll advertisements on your video content from over 40 video ad networks like Google’s AdSense, ScanScout, YuMe and many more. Sign up now and follow the instructions in the LongTail Dashboard.
If you're looking for additional resources to help you set up your Amazon CloudFront account, here are a few helpful links:
If you’re confused, please visit our forums and ask a question to our community – over two million strong!