开发者

Iphone programming IOS4 - add video to HTML code in JSON wrapper

开发者 https://www.devze.com 2023-01-11 20:06 出处:网络
I am writing an applicati开发者_Python百科on which is based in HTML and has a JSON wrapper in the app.

I am writing an applicati开发者_Python百科on which is based in HTML and has a JSON wrapper in the app.

After the 4.0.2 update the iphone does not play video files properly anymore. All the code to play video files is based in HTML but after the update it shows the play button only and I can not click on the video to play it. The file is located in the application and a .m4v or .mov format.

I have tried using embed and object formats, none work on IOS4.0.2 but work on previous versions.

I have found a way to wrap the video in an img file {< img src...img properties... onclick="this.parentNode.innerHTML = '\x3Cembed src=\'videos ... video properties etc...>} this takes 2 clicks to play the video. One click to remove the image and another click to play the video.

I would like to make the video play in 1 click if possible.

If anyone has any tips/tricks on how to make this possible it would be greatly appreciated.


You should use the <video> tag to display video on a web page:

<video src="http://www.example.com/somevideo.mp4">Your browser does not support video</video>

This is the HTML5 way of showing video.

0

精彩评论

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