indigo-player
Highly extensible, modern, JavaScript player.
Features
- Fluid mp4 playback.
- Support for Dash (+ DRM / Widevine & PlayReady). - shaka-player
- Support for HLS. - hls.js
- Advertisement support with FreeWheel.
- A modular structure that allows any developer to hook into the player logic and write custom business rules and extensions. Basically the entire player structure is built as a set of modules.
- Bundle splitting, only loads JS files (eg: HLS.js) when actually needed.
Documentation
Visit the documentation.
If you'd like to develop your own module for indigo-player (apply own business rules, integrate an ad provider, write new media support, ...), take a look at the sample project: https://github.com/matvp91/indigo-player-extension-example
Getting started
The example below will load a simple MP4 file, and attempt to autoplay it.
<html>
<body>
<div id="playerContainer"></div>
<script src="https://cdn.jsdelivr.net/npm/indigo-player@1/lib/indigo-player.js"></script>
<script>
const config = {
ui: true,
sources: [
{
type: 'mp4',
src: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
}
],
};
const element = document.getElementById('playerContainer');
const player = IndigoPlayer.init(element, config);
// You can use the player object now to access the player and it's methods (play, pause, ...)
</script>
</body>
</html>
🍺
Cheers
- @ambroos for being a video nerd!
- @google for maintaining shaka-player
- @video-dev for maintaining hls.js