Inserting HTML5 video using JavaScript for iPad

Posted by Vishal on Stack Overflow See other posts from Stack Overflow or by Vishal
Published on 2010-06-15T15:49:05Z Indexed on 2010/06/15 15:52 UTC
Read the original article Hit count: 216

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about video