These days, most people use smart phones, so it is natural to use cell phones for watching a movie or a video mail. However, many web developers are struggling to implement the natural thing because there is no helpful instruction in the Internet or books.
Of course, if you have a lot of experience in implementing a mobile site, you must already know what I’m saying. However, if you aren’t familiar with mobile web programming, my posting might help you understand how to use <video> tag.
The first issue is what the proper video file format for your website is. Conclusively, I recommend the MP4 file that is encoded by the format of H.264/AVC based on my experience. There are many manufactures of smart phones but I think there are only three distinguished OSs (Operation System) such as iOS, Android, and MS-Mobile 7. The three OSs support the file format; moreover I was able to see the most satisfied results by using the file format. The following links might help you figure out what my point is.
- Video formats supported by iPhone: http://www.apple.com/iphone/specs.html
- Video formats supported by Android: http://developer.android.com/guide/appendix/media-formats.html
- Video formats supported by Win Mobile 8:https://msdn.microsoft.com/en-us/library/windows/apps/ff462087%28v=vs.105%29.aspx
Second, you probably think how to make video files executable on your website. If you have never heard “<video> tag”, you might be in confusion. Actually, HTML5 was announced as a W3C Last Call Working Draft last year, so there is no useful instruction in the Internet and even books. As a result, most web developers are curious about how to use new elements such as <video>, <audio>, <canvas> and etc. Anyway, iPhone system supports HTML5, so you can get satisfied results even though you use only example sources that are provided by HTML 5 specification documents. However, the case of Android is more complicated because each version of Android supports different HTML and video type. According to the official Android homepage, HTML5 has been supported since Android 2.1. However, based on my experience, <video> tag is supported since Android 2.2.
- <video> tag in HTML5: http://www.w3schools.com/html/html5_video.asp
- Android 2.1 Specification: http://source.android.com/compatibility/android-2.1-cdd.pdf
Consequently, in the case of Android, the method of “paly ()” should be called by using Java Scripts like following my example codes.
I hope my posting is useful for you. If you have further questions, please feel free to contact me.
With Best Regards,