possible values:
Media_err_aborted (A numeric value of 1), the download process for media data is terminated due to the user's operational reasons.
Media_err_network (A numeric value of 2) confirms that the media resource is available, but the download of the media data is aborted when a network error occurs.
Media_err_decode (A numeric value of 3) confirms that the media resource is available, but an error occurred while decoding.
media_err_src_not_supported (numeric value
There seems to be fewer and fewer ACC encoding formats to store music, although it is better than almost all traditional encoding methods with the same specification.
I personally feel that IE has always been quite amazing, and it is indeed very personal. Other mainstream browsers support the wav encoding format, which is decisively ignored. But we can't help it either. There are too many people using it. With the trend of win7, there will be more and more users using IE9, so we still have to le
loaded and played, it can be displayed to the user.
5. Controls: Used to set whether to add control bars for the video, such as "playing" and "paused". The control bar can be customized.
6. Loop: Used to set whether the video is played cyclically.
7. Width and Height: used to control the Width and Height of a video.
Although the
Codebase = "http://www.apple.com/qtactivex/qtplugin.cab">
Autoplay = "true" controller = "false" pluginspage = "http://www.apple.com/quicktime/download/">
Video file format
HTML5 supports three video file formats (that is, codecs):. ogg. mp4 or. m4v. WebM. A codec is a computer program that encodes and decodes a digital stream of data using a compression algorithm to make it more suitable for playback. In some browsers, if the MIME type is not set correctly, the media file will not play.To get support for media playback for all compatible HTML5 browsers,
Recently, due to the need for audio in the work, we learned about the emerging audio HTML5 in the video. There is not much to be said about its own properties, but the emphasis is on its own play () and pause () two functions that can be used directly, that is, the play and pause functions we often encounter. Here are the examples I wrote, interested friends can
HTML5 implements the Winamp2.9 Audio Player Plug-in, html5winamp2.9Winamp2-js is a plug-in that uses html5 and javascript to implement Winamp 2.9 audio players. The Winamp Audio Player Plugin supports drag-and-drop files, custom skins, and visual modes. Features:The actual W
You can try listening and pausing with a list of music you've recently worked on and click Audition. In fact, HTML5 implementation of this function is very simple.Embed the outer chain of music in the Web page firstahref= "javascript:void (0);"onclick= "Music.changeclass (this, ' media ');"class= "Btn Btn-green"Data-id= "Edit_btn"Data-width= "The "Data-height= " the"Data-mask= "true"Data-title= "Audition">Try Listeninga>Audiopreload= "preload"src= "Ht
Introduction: In the development of Android HTML5 Many people have encountered audio tag autoplay in some devices invalid problem, the Internet is mostly about how to operate in JS, that is, at a specific time to call the audio play () method, on the Android or invalid.
First, the solution
In Android 4.2, the Allow user gestures to touch the
Recording Permission * *
Avaudiosession *session = [Avaudiosession sharedinstance];
[Session Setcategory:avaudiosessioncategoryplayandrecord
Withoptions:avaudiosessioncategoryoptionduckothers
Error:nil];
[Session requestrecordpermission:^ (BOOL granted) {
if (granted) {
NSLog (@ "Permission OK to record audio");
[Self startrecordingaudio];
}else {
NSLog (@ "We don ' t have permission to the
Ios loading html5 audio labels cannot be automatically played using js, ioshtml5
html5audioTags cannot be automatically played in ios browsers. Android and pc are normal for a small project recently, but ios is not the case. I have read a lot of information, the following method may not be the best method. If you have a more convenient method, please leave a message:
Html section:
Js section:
// Function:
Today do a mobile phone play page, found on iOS as long as the lock screen or switch other programs music off, find a long time to find the reason.Because the page plays a file, so I wrote it.id= "audio" autoplay= "true" controls= "" preload = "preload" > Audio >Then set MP3 address via JSAudio.setattribute ("src", "Http://xxxx.mp3");Refer to other websites and find that music files written in source wil
type="button" value="Whisper " onclick="Down () " />nbsp;script> varVideo=document.getelementbyid ("Video");//Play Video function playvideo(){Video.play (); }//Stop video function stopvideo(){Video.pause (); }//Fast forward 10 seconds function forward(){video.currenttime+=Ten; }//Rewind 10 seconds function back(){video.currenttime-=Ten; }//Mute function shutup(obj){ if(video.muted) {video.muted=false; Obj.valu
Transferred from: http://blog.csdn.net/u012246458/article/details/50618759Audio play Music[Java]View PlainCopy
"audio" src="Images/openspeech.mp3" style= "opacity:0" preload= "Auto" controls loop hidden="true"/>
This code is: can do background musicPage load loading music but not playingBy calling this code:[Java]View PlainCopy
var Myauto = document.getElementById (' audio ');
Because IOS Safari restrictions do not allow audio AutoPlay, users must actively interact (for example, click) to play audio, so we actively play audio with a user interaction event.This pit is believed to have been stepped on, and before IOS 9 appeared, such a hack scheme was still well-established.But when IOS 9 appeared, it found that the solution was "dead".T
Because IOS Safari restrictions do not allow audio AutoPlay, users must actively interact (for example, click) to play audio, so we actively play audio with a user interaction event.This pit is believed to have been stepped on, and before IOS 9 appeared, such a hack scheme was still well-established.But when IOS 9 appeared, it found that the solution was "dead".T
Related skills
HTML5+CSS3(Implement page layout and dynamic effects)
Iconfont(Use vector icon Gallery to add player related icons)
LESS(Dynamic CSS Authoring)
jQuery(quickly write JS script)
gulp+webpack(Automated build tools for compiling and compressing code such as LESS,CSS,JS)
Features implemented
Play Pause (click to toggle Playback status)
Next Song (toggle next)
Shuffle (play the next song automati
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 container is very large, the encoding needs to be enc
You can try listening and pausing with a list of music you've recently worked on and click Audition. In fact, HTML5 implementation of this function is very simple.Embed the outer chain of music in the Web page firstahref= "javascript:void (0);"onclick= "Music.changeclass (this, ' media ');"class= "Btn Btn-green"Data-id= "Edit_btn"Data-width= "The "Data-height= " the"Data-mask= "true"Data-title= "Audition">Try Listeninga>Audiopreload= "preload"src= "Ht
Over the past few days, I have been studying the style effect display problem in the html5 environment. htm5 labels are more concise. Combined with jquery and bootstrap3, I can make better page effects that I want. Here we will introduce the js library used for audio and video playback: audio. js http://kolber.github.io/audiojs/ You can easily complete the follow
If you still use the following: amp; lt; EMBEDsrc = amp; ldquo; music. mid amp; rdquo; autostart = amp; ldquo; true amp; rdquo; loop = amp; ldquo; 2 amp; rdquo; widt
If you use the following code:If you play music in the form, it will be out. html5 audio can better support music playing, of course it does not support IE.Browser support:
Browser
Support
Codecs
Chrome
3.0
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.