Home > Article > Web Front-end > Detailed description of new features such as html5 audio audio and video video_html5 tutorial skills
As the next generation web standard, html5 has started the html5 craze. Regarding html5, I just took a look based on my understanding. I don't want to say anything about html5 and RIA (silverlight, flash, JavaFx, etc.), and there is nothing to say. There is a reason for its existence. Which one is better or worse is left to facts and time to prove.
Some new features have appeared in html5:
canvas element video and audio element;
Support for local offline storage (localStorage, sessionStorage);
New special content elements: article, footer, header, nav, section;
New form controls: calendar, date, time, email, url, search.
Let’s take a look at video and audio today: The standard method for video is specified in HTML5: video
属性 | 值 | 描述 |
---|---|---|
autoplay | autoplay | 如果出现该属性,则视频在就绪后马上播放。 |
controls | controls | 如果出现该属性,则向用户显示控件,比如播放按钮。 |
height | 像素 | 设置视频播放器的高度。 |
loop | loop | 如果出现该属性,则当媒介文件完成播放后再次开始播放。 |
preload | preload |
如果出现该属性,则视频在页面加载时进行加载,并预备播放。 如果使用 "autoplay",则忽略该属性。 |
src | url视频地址 | 要播放的视频的 URL。 |
width | 像素 | 设置视频播放器的宽度。 |
autobuffer |
Autobuffer (自动缓冲) |
在网页显示时,该二进制属性表示是由用户代理(浏览器)自动缓冲的内容,还是由用户使用相关API进行内容缓冲 |
poster |
url图片地址 |
当视频未响应或缓冲不足时,该属性值链接到一个图像。该图像将以一定比例被显示出来 |