views:

34

answers:

1

Hello all,

I am writing video code in an iphone, based on HTML.

With the following code the movie will play but when I click done the video stops but the html page is gone, all I see is a giant video play button taking up the entire screen. Anyone have any ideas how to go back to the page where the video was clicked?

a href="videos.mov" type="video/quicktime" img src="images/videos.png"/a

Tried with the html5 video tag and that does not work either on the iphone IOS4.

Thanks

A: 

In your example you're linking to an actual video file, so the URL is being pointed to the video, iOS is playing it full screen, then when finished the URL is still on the video file itself. What you want to use is the <video> tag and have the video on the actual page, like this:

<video src="videos.mov" poster="images/videos.png" width="480" height="270"></video>

Obviously you should switch up the width and height of the video to match your settings, and if you're saying the video plays fine currently, then it's encoded properly. The only other thing you need to make sure of is that you've specified the HTML5 doctype properly at the very top of your document, which is:

<!doctype html>

Easy peasy.

Andrew