document.addEventListener("DOMContentLoaded", function() { var videoPlayerDiv = document.createElement('video'); videoPlayerDiv.id = 'video'; videoPlayerDiv.controls = true; document.body.appendChild(videoPlayerDiv); var script = document.createElement('script'); script.src = ''; document.body.appendChild(script); });