Skip to content
HTML5 Video player for Icecast Playlst
JavaScript HTML
Branch: master
Clone or download
Latest commit f66ff9b Mar 18, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md [fix] Readme presentation. Apr 23, 2014
faimaison.html Refactor & Rename script. Apr 23, 2014
m3uStreamPlayer.js add refreshSource method Mar 17, 2016

README.md

m3uStreamPlayer

HTML5 Player from m3u playlist

Use playlist from Icecast server with audio/video HTML5 element.

Use case: Icecast setup with several relays servers; If currently used server failed, the next one is automatically used.
For setting up Icecast Relay, see http://www.icecast.org/docs/icecast-2.1.0/icecast2_relay.html

## HTML ##

Use a <video> tag and set playlist url with data-playlist attribute. Ex:

<video id="video" controls loop autoplay width="640" 
    data-playlist="http://live.cloudfrancois.fr/playlist/faimaison">
</video> 

JS ##

Load m3uStreamPlayer.js file after your <video> tag

<script src="m3uStreamPlayer.js"></script>

and init script

m3uStreamPlayer.init({selector: '#video', debug: false});

Options

  • selector : (string) Use querySelectorAll syntax
  • debug : (bool) Printed in console

NB : You can simply pass a selector string like m3uStreamPlayer.init('#video');

Example

Working example with FAImaison.net streaming playlist in faimaison.html file, and on faimaison.net

You can’t perform that action at this time.