JSFiddle - React, Tailwind, and code Playground
by zakariamouhid
HTML
<pre id="pre"></pre>
<script>
var player = new Clappr.Player({
source: "https://mydomain.live/hls/live.m3u8",
parentId: "#player",
width: "100%",
height: "100%",
autoPlay: true
});
</script>
<script>
const source = Array.from(document.querySelectorAll('script')).map(script => {
const match = script.innerHTML.match(/source\:\s*"([^"]+)"/);
return match ? match[1] : '';
}).find(Boolean);
pre.append(source);
</script>