Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>ACF (Amazon CloudFront) Distributions</strong> utilise <strong>Flash Media Server</strong> for <em>RTMP streams</em> so, in themselves, CF Distributions aren't a complete solution in regard to offering streaming capabilities for <strong>non-flash</strong> players/devices too! </p> <p>This leaves you with 2 choices; </p> <ol> <li>offer streaming only to flash users/devices with a regular, progressive download option via HTML5 OR</li> <li>Setup a WOWZA media server with your content to stream if in HTML mode.</li> </ol> <p>Either way, this can be achieved using the player's <strong>modes[] var</strong> where you could provide different setup parameters such as the <strong>path/file</strong> and other variables such as <strong>streamer</strong> &amp; <strong>provider</strong> in your <strong>playlist/player</strong> accordingly.</p> <hr> <p><strong>Example</strong> Let's presume you have the following setup;</p> <ol> <li>A bucket, 'my-music.s3.amazonaws.com/'. This is where you store your media. For instance, 'my-music.s3.amazonaws.com/audio/' for audio and 'my-music.s3.amazonaws.com/video/' for videos.</li> <li>An RTMP streaming distribution with your 'my-music.s3.amazonaws.com/' bucket as the source. This will be your streamer flashvar, something like 'XXXXXXXXXXX.cloudfront.net/cfx/st/'.</li> <li>An MP3 located in the location '/audio/song.mp3'.</li> </ol> <hr> <p><em>To make this work in either Flash (with RTMP stream) OR HTML5 (as a progressive download) you would need to have a player setup as follows...</em></p> <pre><code>&lt;script type="text/javascript"&gt; /* set var baseURL to your media BUCKET NOT your streaming distribution */ var baseURL = "https://my-music.s3.amazonaws.com/"; jwplayer('mediaplayer').setup({ 'id': 'playerID', 'width': '480', 'height': '270', 'file': 'audio/song.mp3', /* change to your song/video path */ 'provider': 'rtmp', 'streamer': 'rtmp://XXXXXXXXXXX.cloudfront.net/cfx/st/', 'modes': [ { type: 'flash', /* set the location of your SWF object */ src: 'https://my-player.s3.amazonaws.com/plugins/jwplayer/player.swf' }, { type: 'html5', config: { /* prepend your BUCKET URL (baseURL var) to the file path */ 'file': baseURL + 'audio/song.mp3', /* set provider */ 'provider': 'video' } } ] }); &lt;/script&gt; </code></pre> <p>Of course, if you're using a <em>CMS, widget, plugin or module</em> to manage your players, you'll probably be able to access &amp; edit these parameters in an admin screen or alternatively, set them programmatically. </p> <p>One thing to note, is that the order you place the <strong>type</strong> objects in the <strong>mode[] array</strong> is the order in which JW player will try to load.</p> <hr> <p>For more information, please see <a href="http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/18508/jw-embedder-modes">JW Embedder Modes here</a>.</p> <p><strong>Offer Dual streaming</strong> If you want to offer streaming using HTML5, you'd use the same approach, changing the streamer, provider attributes in the html5 type object accordingly.</p> <p>Hope this is helpful!</p> <p>Gez</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload