What is the correct way to embed HTML5 video dynamically so it works on the iPad? (with plain Javascript)
This isn't working:
<div id="placeholder"><script type="text/javascript" src="embedvideo.js"></script></div>
Here's the code for embedvideo.js:
var div = document.getElementById('placeholder');
div.insertAdjacentHTML('beforeend', '<video width="800" height="450" poster="image.jpg" controls><source src="video.mp4" type="video/mp4"></video>');
Thanks!