开发者

How do I embed a quicktime movie into an iphone web app using javascript?

I'm creating an iphone webapp in dashcode for the first time and I can not figure out the code for embedding a video into the webapp.I have an html file and have a few pages it switches between but I need to create a function in javascript so when I click a button that it will pull up a video I in quicktime. Any sample code or thoughts? If anyone could give me som开发者_如何学运维e samplecode I would appreciate it


You could try something like this (completely untested):

function showVideo(vidFile) {
    var vidElem=document.createElement("video");
    vidElem.setAttribute("src", vidFile);
    vidElem.play();
}

And then invoke it like this:

showVideo("your_movie_file.mov");


  1. create your .html file
  2. embed the following code :

<video src="your_movie_file.mov" controls="controls"> your browser does not support the video tag <video>

  1. upload your file to your webserver.
  2. test your files. (make sure your movie file in your webserver too...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜