Most of the time, Web pages use Flash to play video. In the current environment of Flash, HTML5 brings us a solution--In HTML5, embedded media can be supported via HTML tags "audio" and "video", enabling developers to easily embed media into HTML documents.Video formatCurren
Lab Report
Course Name
Mobile Internet development based on Android platform
Date of experiment
April 15
Name of the experimental project
Play audio and video in the app
Location of the experiment
S3002
Type of experiment
-Verification Type √ design type-comprehensive type
Hours
The purpose and requirements
(File.getabsolutepath ()); //Reset the audio to playPlayer.prepare ();//Pre-load audioPlayer.start ();//Start PlaybackHint.settext ("playing audio in SD ..."); } Catch(Exception e) {e.printstacktrace ();//Output Exception Information}//Start playing music } }); //Add a Click event listener for the play button//Button4.setonclicklistener (New Onclicklistener () {////@Override//Public void OnClick
of research I found that the most satisfying to me is the Google browser to HTML5 video support is the bestBut the problem came up and then looked down to see if everyone had the same problem I hope you can come out with the children's shoes I'm looking into the HTML5 of my eggs.The problem arises: attention, everyone.IE 10 or IE11 use the official website of th
(H5 supported, Flash Player not supported)
As shown above, more than half of the platforms (including those that have abandoned Support) Support Flash Player. If there are more than half of them, there is a need and possibility of switching.
The perfect situation is to detect the operating system and browser version and adapt to different situations, for example:
In Windows XP and IE6 browsers, Flash Player is used to play videos;
In Mac OS X,
.6 , set up a picture of the replacement video (cover picture)The poster property can be set, and the browser will use this image in the following three scenarios:(1) The first frame of the video is not loaded.(2) Set the Preload property to None(3) The specified video file was not found7 , browser-compatible, how to make every browser to
element, and a video element can contain any number of source elements.The browser loads the first file format referenced by the source element it supports, and ignores other sources. Browsers that cannot play HTML5 videos will display alternate links in the messages you provide or can also place video or other conten
In the past, Flash is the best way to solve the video on the web, as of now mainstream, such as Youku and other video sites, shrimp, such as online music website, still use Flash to provide playback services. But this situation will change with the development of HTML5. As far as video is concerned,
IPhone, IPad How to play Web page call Youku video?5 reviews shareSort by poll by Time6 answersEndorse 4 Objection, will not show your nameThe cold pond crosses the moon,I'll elope with my dream. http/sometime.me Tao, users, Fan and other people agreeOnline video is generally based on flash and FLV, and it is well known that iOS Safari does not support flash
code, such as HTML:
JS Code:
var media = document.getElementById ("MusicBox");if (!MEDIA.SRC) {MEDIA.SRC = "/project/shake-money/img/shake.mp3"}Media.play ();Can play normally in PC browser, but not in the micro-letter page. Tried a lot of posture, just can't play sound. Think of the micro-letter JS SDK, looking for a side also does not have the appropriate interface.
There is no way, simply in Wx.ready
Two ways to play Video:Play video with Videoview (convenient, recommended)Play video using MediaPlayer and Surfaceview (early way)The first way:The process of using Videoview to play video is as follows:Define the Videoview compon
Apple ios
MP4
H.264
ACC, MP3, PCM
Apple Safari
MP4
H.264
Google Android (pre v.3)
--
--
--
Google Chrome
MP4, OGG, WebM
Theora, VP8
ACC, MP3, Vorbis
Microsoft Internet Explorer
MP4
H.264
ACC, MP3
Mozilla Firefox
OGG, WebM
Theora, VP8
PCM and Vorbis
Opera
OGG, WebM
Theora, VP8
PCM and Vorbis
Ii. HTML5
Attribute
Ava
loaded, the property is readable and writable, and you can modify the width,height or set the display size as you wish. If the width of the setting does not match the size of the video itself, it can cause black areas to appear around the videowidth,videoheight return the video's intrinsic width and height, read-only3. HTML5 capture video
Android webview switches the screen through html5 to play online videos, and webviewhtml5
1. Add Network Access Permissions
2. Add full screen support developer official documentation for webview. Descriptions of html5 video playback are as follows: In order to support inline HT
multimedia fileAutoPlayLoopMuted:ControlsCrossorigi:PosterMediaGroup:Preload:WidthHeightVideowidth:Videoheight:Third, source sub-label and its useSummary: The source tag is used to set up multiple multimedia file resources, and the browser will select its supported multimedia files from multiple multimedia file resources to play, with the following usage and tag properties:controls= "Controls"> Sorry, your browser does not support
HTML5 video tag (player) learning notes (2): playback control, html5videoThis article mainly introduces the HTML5 video tag (player) learning notes (2): playback control, this article describes how to get the total video duration, play
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.