Recently there are learning HTML5 in the use of video tags (players), here to do some learning notes, easy to review and record, this article is the first, will introduce the use of the tag to initialize what to do. Online tutorials are actually a lot of w3cschool inside the most simple and detailed, then these are some of the more direct application. This article directory:
Using Labels
add s
Android plays video with its own Videoview control
Activity
The public class Activity01 extends activity {/** called the ' when ' is the ' The activity ' is the ' the '---' @Override
public void OnCreate (Bundle savedinstancestate) {super.oncreate (savedinstancestate);
Setcontentview (R.layout.main);
Final Videoview Videoview = (videoview) Findviewbyid (R.ID.VIDEOVIEW01);
Button Pausebutton =
One, HTML5 video 1, supported formats 2. Formatsrc= "Movie.ogg" width= "+" height= " +" Controls = "Controls" > Your Browser does not support the video tag. Video >The control property is used to add play, pause, and volume controls.The content inserted between The
HTML5 's audio and videoL Label? Audio, video? SourceL Video Container? Container file, similar to compressing a set of files– Audio Tracks– Video Tracks– Meta Data: Cover, title, subtitles, etc.– Format:. avi,. flv,. mp4,. mkv,. OGV, etc.L Codec? The original video containe
Under the WebView of Android
HTML5 's video settings AutoPlay properties
Or use the Play method in document ready
Can't make it play automatically
This problem can only be resolved using the WebView onpagefinished method, as follows:
Copy Code code as follows:
Mplayer.setwebviewclient (New Webviewclie
HTML5 video and audio audio detailed
Some new features have emerged in HTML5:
Canvas elementVideo and audio audio elements;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.Take a look at
of the video is loaded, and auto means letting the browser decide what to do.
Specify multiple sources for a media file to ensure support for all browsers
Implemented through the source element, multiple source elements can be added to the Videl tag to specify the source of the media file Videocontrols muted autoplay preload= "None"Loop> Sourcesrc= "Mp4filesource.mp4"> Sourcesrc= "WEBMFILESOURCE.WEBM"> P>ahref="">The old brow
Imagebutton webclose = (imagebutton) This. findviewbyid (R. id. webclose); webclose. setonclicklistener (New onclicklistener () {@ override public void onclick (view v) {// todo auto-generated method stubBrowser. Destroy ();// You can stop the sound finish () When you disable the video; // Android. OS. process. killprocess (Android. OS. process. mypid ());}});
When you use webview to
the play button.
Height
Pixels
Sets the height of the video player.
Loop
Loop
If this property appears, the media file starts playing again when it finishes playing.
Preload
Preload
If this property appears, the video loads when the page loads and prepares to play.If you use "autoplay", the
Print?
More and more websites now provide video playback (non-plug-ins ). HTML5 provides the standard for displaying videos. So how can we check whether your browser supports video playback? Let's write a column.[Html]
[Javascript]Function checkVideo (){If (!! Document. createElement ('video'). canPlayType){// Create
Simplified HTML5 learning notes (4): video, audio, meter, datalist, keygen, output, html5datalistVideo
With the
In the past (and now), we usually used tedious and ugly code like the following to place videos on pages. However, This method requires the browser to install Flash plug-ins and support JavaScript:
HTML5 method:
Autoplay: Used to set whether the
any tracks, the default track is used.
Kind
CaptionsChaptersDescriptionsMetadataSubtitles
Specifies the text type of the text track.
Label
Text
Specifies the label and title of the text track.
Src
Url
Required. Specifies the URL of the track file.
Srclang
Language_code
Specifies the language of the track text data. This property is required if the kind property value is "subtitles".
Au
support to embed directly into the Web page, and--the most cool is--click on the video, can "explode", each piece of debris can also play the normal!
Figure 5 AO 3.0 HTML5 Video "burst" special effects
In addition to HTML5
event is generated when an error occurs loading media
Loadeddata
This event occurs when media data is loaded
Loadedmetadata
This event occurs when the total length of time, resolution, and metadata of the word track are received
Loadstart
This event occurs when you start to find media data
Pause
This event occurs when the media is paused
Play
This event occ
This article mainly introduces how to use js to check whether the browser supports the video tag in html5. For more information, see
The Code is as follows:
// Check whether HTML5 is supportedFunction checkVideo (){If (!! Document. createElement ('video'). canPlayType ){Var vidTest = document. createElement ("
1. Video and audio tagsor Property Value DescriptionAutoPlay AutoPlay (can be omitted) video AutoPlayControls controls (can be omitted) to display the playback controls to the userwidth px player widthsHeight px Player HeightsLoop loop, play continues, play count after playingPreload proload whether to wait for the loa
HTML5 -- Video and html5video support formatsHTML5-Video format
Currently, the video element supports three video formats:
Format
IE
Firefox
Opera
Chrome
Safari
Ogg
No
3.5 +
10.5 +
5.0 +
No
MPEG 4
9.0 +
No
No
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.