JSFiddle - React, Tailwind, and code Playground

by scurrilus

HTML

<div id="myPlayer">

</div>

JavaScript

var playerId = "5bbdcf2cd20d5f67c0f79257",
		videoId = "5bd1bd84bc03936f75f58101",
    companyId ="5bbdcf2cc920640535836ab9",
    player = `<div class="vdb_player vdb_${playerId}${companyId}"></div>`;
    document.getElementById("myPlayer").innerHTML = player;
    
    var s = document.createElement('script');
    s.type = 'text/javascript';
    s.src = `//delivery.vidible.tv/jsonp/pid=${playerId}/vid=${videoId}/${companyId}.js`;
    try {
      // s.appendChild(document.createTextNode(code));
      document.body.appendChild(s);
    } catch (e) {
     //  s.text = code;
      document.body.appendChild(s);
    }