0
I’m creating a full page by the Document.createelement() method, only I’m facing a problem creating a video tag. It creates the element but does not play the video, I wonder if the video tag works with the createelement.
var table = document.createElement("TABLE");
table.setAttribute("align","center");
var trplay = document.createElement("TR");
var tdplay = document.createElement("TD");
var player = document.createElement("VIDEO");
player.setAttribute("width","502");
player.setAttribute("height","360");
player.setAttribute("id","Video1");
var source = document.createElement("SOURCE");
source.setAttribute("scr","video1.webm");
source.setAttribute("type","video/webm");
it creates the following code:
<table align="center">
<tr>
<td>
<video width="502" height="360" id="Video1">
<source scr="video1.webm" type="video/webm">
</video>
</td>
</tr>
</table>