Inserting HTML5 video using JavaScript for iPad
- by Vishal
Hello,
I am trying to insert a video into HTML using jQuery for iPad but all I see is a black screen. If I add the video tag directly to the HTML page all seems to work fine.
Here is what I have in my JavaScript and I call this using a function for onClick event.
var html = "";
html += '<video id="someVideo"';
html += ' width="'+settings.width+'" height="'+settings.height+'"'
html += ' controls="controls">';
html += '<source src="'+url+'" type="video/mp4" />';
html += '</video>';
$("#videoDiv").html(html);
Any help will be greatly appreciated
Thanks