Initialize FPlyr
const dom = new FPlyr({
video: "[video source]",
option: {
showThumb: true,
panelType: "[style choice]",
panel: [
"play", "progress", "time", "timeMini",
"volume", "volumeMini", "rate", "full"
],
volume: 100,
mute: false
},
when: {
ready: function () {
console.log("Player is ready");
},
playing: function () {
console.log("Playing");
},
pause: function () {
console.log("Paused");
},
end: function () {
console.log("Playback ended");
},
destroyed: function () {
console.log("Player removed");
}
}
});
(...).appendChild(dom.body);