Create Instance
<div id="lumio-stream-player"></div>
const lumioStreamPlayer = new LumioStreamPlayer({
container: "lumio-stream-player",
aspectRatio: "16:9",
title: "live streaming by lumio.id",
autoStart: true,
autoFallback: true,
controls: true,
loop: true,
showBigPlayButton: true,
mute: false,
sources: [{
type: "webrtc",
file: "wss://emitter.lumio.id:3334/app/stream"
}],
webrtcConfig: {
timeoutMaxRetry: 10,
connectionTimeout: 10000,
},
onReady: function () {
console.log("onReady");
},
onStateChanged: function (state) {
console.log("stateChanged", state);
},
onSeek: function (position) {
console.log("onSeek", position);
},
onSeeked: function () {
console.log("onSeeked");
},
onTime: function (duration) {
// This may occur as frequently as 10 times per second
// console.log("onTime", duration);
},
onClicked: function (EventObject) {
console.log("onClicked", EventObject);
},
onDestroy: function () {
console.log("onDestroy");
},
});
Player