In addition to the various players, you can stream your media using HTML 5. Most modern web browsers and even mobile phone browsers can stream audio and video with HTML 5. Other players based on Flash cannot deliver to such a wide audience. However, not every browser can play the same file, so we have to offer different formats of the same file in order to reach the most people. For audio, we can use .mp3 and .ogg, and for video we can use .mp4, .ogv, and .webm. See the Wikipedia page on HTML 5 and browser support for details on which browsers can use which format.
For these tutorials, you will need to have a CDN-enabled container in your Cloud Files account.
CDN-enable a container
Now you are ready to learn about streaming audio and video with HTML5.
We created sample audio and web page files for you to download and play with. They are wrapped up in a zip archive for simple downloading. HTML5 requires using mp3 and ogg file format to cover the most platforms. Both formats are included in our zip archive. When you use your own audio files, you may find media.io convenient for converting mp3s into ogg files.
Instructions:
Sample code:
<audio controls>
<source src="full/link/to/http/mp3/audio/file.mp3" type="audio/mpeg" />
<source src="full/link/to/http/ogg/audio/file.ogg" type="audio/ogg" />
<em>Sorry, your browser doesn't support HTML5 audio.</em>
</audio>
Here is what you should see when it's working:
We created sample video and web page files for you to download and play with. They are wrapped up in a zip archive for simple downloading. HTML5 video requires three (3) formats, mp4, .ogv, and .webm, to make sure we cover the most platforms. The .png image displays is a placeholder before your visitor starts the video. When you use your own videos, you might find the Miro Video Converter useful to convert your videos into the alternate formats. You may download this free utility directly from the Miro site or from the Apple iTunes store.
Instructions:
Sample code:
<video width="356" height="200" controls poster="full/http/link/to/image/file.png" >
<source src="full/link/to/http/mp4/video/file.mp4" type="video/mp4" />
<source src="full/link/to/http/ogv/video/file.ogv" type="video/ogg" />
<source src="full/link/to/http/webm/video/file.wbem" type="video/webm" />
<em>Sorry, your browser doesn't support HTML5 video.</em>
</video>
Here is what you should see when it's working:
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

3 Comments
The links to the zip-files
Could you please update them.
re: zipfiles
Progressive Download not Streaming
regards,
-fs
Add new comment