This plugin displays preview thumbnail images on the timeline.
See: https://flowplayer.org/docs/plugins.html#audio
There are 2 ways to use the plugin:
Play audio in player with screen, optionally with a cover image instead of video. Ideal for mixed video/audio playlists.
flowplayer('#player', {
ratio: 5/12,
clip: {
title: "Music",
audio: true,
coverImage: "//example.com/music-cover.jpg",
sources: [{
type: "application/x-mpegurl",
src: "//example.com/music.m3u8"
}, {
type: "audio/mp4",
src: "//example.com/music.m4a"
}, {
type: "audio/mpeg",
src: "//example.com/music.mp3"
}, {
type: "audio/ogg",
src: "//example.com/music.ogg"
}]
}
});
A dedicated audio player, controls only.
flowplayer('#player', {
clip: {
audioOnly: true,
sources: [{
type: "application/x-mpegurl",
src: "//example.com/music.m3u8"
}]
}
});
http://demos.flowplayer.org/api/audio.html
The plugin can be used in a browserify and/or webpack environment with a commonjs loader:
var flowplayer = require('flowplayer'),
plugin = require('flowplayer-audio');
plugin(flowplayer); // plugin injects itself into Flowplayer
Build requirement:
cd flowplayer-audio
make deps
make
- The Flash engine supports HLS only.