JSFiddle - React, Tailwind, and code Playground

by zakariamouhid

HTML

<pre id="pre"></pre>

<script id="playerScript">
  var player = new Clappr.Player({
    source: "https://mydomain.live/hls/live.m3u8",
    parentId: "#player",
    width: "100%",
    height: "100%",
    autoPlay: true
  });
</script>

<script>
	const match = playerScript.innerHTML.match(/source\:\s*"([^"]+)"/);
  const source = match ? match[1] : '';
  pre.append(source);
</script>