Home  >  Article  >  Web Front-end  >  Detailed description of new features such as html5 audio audio and video video_html5 tutorial skills

Detailed description of new features such as html5 audio audio and video video_html5 tutorial skills

WBOY
WBOYOriginal
2016-05-16 15:50:431464browse

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图片地址

 

当视频未响应或缓冲不足时,该属性值链接到一个图像。该图像将以一定比例被显示出来


In HTML5, the audio standard is specified as the audio element. The audio element can play sound files or audio streams.
The audio format is similar to video: direct multiple sources:

Copy code
code As follows:


Your browser does not support it yet
Its attributes are less height, width, poster. Multimedia is becoming more and more important in our development, and these videos and audio appear in html5.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn