This example presents a simple variant how to generate an HLS stream. Simple playback of the playlist generated on the m3u8 server.
This example does not include the ability to rewind, switch to the next track, etc.
Examples are presented using the next tags: audio, video and hls.js library and Bitmovin player.
Node.js required to start the app.
yarn install
ornpm install
yarn start
ornpm run start
- start a project on localhost:5001
-
/sources - original mp3 files
-
/chunks - audio files after ffmpeg decoding
-
/utils - instruments for generate /chunks and create ./chunks.json
3.1. mp3ToHLSChunks.js - mp3 to HLS
3.2. splitChunksIntoGroups.js - creating data structure for manipulating data about chunks
-
/web_hls - audio player examples
- HTML5 audio tag (macOS/iOS/Android) - http://localhost:5001/audio.html
- HTML5 video tag (macOS/iOS/Android) - http://localhost:5001/video.html
- hls.js library - http://localhost:5001/hlsjs.html
- Bitmovin player - http://localhost:5001/bit.html