Recently, many practical html5 video playing and music playing functions have been seen in the forum. Most of them are looking for answers. So I will make a demo here for everyone to learn from each other. Html5 development is becoming increasingly popular, and video is an essential part. How to make your website take advantage depends on your functions and user experience. Html5 has made a lot of discounts on video, so we can use it very well.
In the past, flash was the best video solution on the web page. As of now, flash is still the mainstream, such as those online music websites such as Youku and Xiami, flash is still used to provide the playback service. However, this situation will change with the development of HTML5. In terms of videos, HTML5 adds the video function to play videos online.
Using HTML5 video allows you to easily use JavaScript to control video content. The function is very powerful and the loading speed is faster with less code. In addition, the cross-platform performance is better, especially for tablets and mobile phones. For example, Apple products do not support flash and only support the video function in HTML5.
Although HTML5 compatibility is currently a tough problem, it is only a matter of time. Let's talk nonsense. Read the Code:
<! DOCTYPE html PUBLIC "-// W3C // dtd html 4.01 Transitional // EN" "http://www.w3.org/TR/html4/loose.dtd"> View the running effect (full screen on the mobile phone ):
Non-full screen:
Okay, that's it. Here the video-js.js frame is used. If you need source code, please click to download: http://download.csdn.net/download/xmt1139057136/7531669
If you do not understand, please join the QQ group: 135430763 to learn together!