const player = OvenPlayer.create("player_id", { autoStart: false, autoFallback: true, aspectRatio: "16:9", mute: false, disableSeekUI: true, playbackRates: [], sources: [ { label: "WebRTC (low latency)", type: "webrtc", file: "wss://your.server.ip:3334/app/stream/webrtc?policy=eyJ1cmxfZXhwaXJlIjo2Mjg5MzE4ODAwMDAwfQ&signature=whGrRzv7GrNbHy8pIcG2qEPmeVo", }, { label: "HLS", type: "hls", file: "https://your.server.ip:3334/app/stream/llhls.m3u8?policy=eyJ1cmxfZXhwaXJlIjo2Mjg5MzE4ODAwMDAwfQ&signature=UqgRtDIuM6PNOHNVO640Ij731yg", }, ], }); player.on("ready", () => { window.player = player; var audioCheck = player.getMediaElement().play(); // If website is not trusted by browser to autoplay with audio, autoplay muted instead if (audioCheck !== undefined) { audioCheck.catch((error) => { player.setMute(true); player.play(); }); } });