var player = videojs("myPlayer");
<script>// Find video parent elementvar video_parent = document.getElementById("video_parent");// Remove player from documentplayer.dispose();// Create new video element and set appropriate attributesvar video = document.createElement('video');video.id = "newPlayer";video.className="video-js";video.preload="auto";video.controls="true";video.style.width="100%";video.style.height="100%";video.setAttribute("playsinline","true");// Append new video element to parent elementvideo_parent.appendChild(video);// Initialize video.js and Nuevo pluginplayer = videojs("newPlayer");player.nuevo();// Set video sourrce player.src({ src:"//domain.com/video.m3u8", type:"application/x-mpegURL"});// Start playbackplayer.play();</script>