0
I tried to create a video on my page that is generated by clicking the button 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 didn’t succeed to make the video appear, someone would point out the problem?
You want to put the video inside the input?
– hugocsl
https://videojs.com/
– Willian