I tried to create a video on my page which is generated by button click through javascript, as follows in the code:
function tocar_video(mysrc){
var video = document.createElement('video');
video.src = mysrc;
video.autoplay = true;
}
.bt202{
background-image:url("https://image.freepik.com/icones-gratis/botao-de-play_318-42541.jpg");
background-size:100% 100%;
background-repeat:no-repeat;
width:50px;
height:50px;
}
<!DOCTYPE html>
<html>
<body>
<input class="bt202" id="00202" type="button" onclick="tocar_video('http://somesite.com/somevideo.mp4');"></input>
</body>
</html>
But I was not successful in making the video appear, could anyone point out the problem?