JSFiddle - React, Tailwind, and code Playground

by Shaunak Deshpande

HTML

<button>Src</button>
<video id="video" width="320" height="240" controls>
</video>

JavaScript

var video = document.getElementById('video');
video.addEventListener('click',function(){
  video.play();
},false);
$('button').click(function(){
    $('video').html('<source src="http://www.w3schools.com/html/movie.mp4">'+
  'Your browser does not support the video tag.');
    $('video').click();
});