html5-audio

“Error: Unsupported audio type or invalid file path” for HTML5 Audio tag in Internet Explorer 10

自闭症网瘾萝莉.ら 提交于 2019-12-01 04:46:01
I have the following html5 document with audio tag and a fallback to Flash for browsers that don't support it: <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> </head> <body> <audio autoplay controls preload="auto" autobuffer> <source src="trumpet.ogg" type="audio/ogg"> <source src="trumpet.mp3" type="audio/mp3"> <source src="trumpet.wav" type="audio/wav"> <source src="trumpet.m4a" type="audio/aac"> <!-- Flash fallback --> <object width="1" height="1" type="application/x-shockwave-flash" data="player.swf"> <param name="movie" value="player.swf">

How can I make Chrome use the range http header for seeking in audio?

只谈情不闲聊 提交于 2019-12-01 04:44:23
问题 It looks like Chrome downloads from the beginning of a file when scrubbing past the buffered/loaded duration, even though the 'seekable' amount claims to be 100%. I put up a demo page hardcoded to a 59 min audio file stored on s3, but otherwise identical to the jPlayer demo: http://beta.prx.org/jplayer_demos/demo-01-supplied-mp3-bm.htm I'm testing on a Mac (10.6.8): On Safari (5.1.4) , if you scrub past the loaded/buffered duration, it initiates another request using the range header, and

Is it possible to record sound with HTML5?

房东的猫 提交于 2019-12-01 04:31:43
I'm considering a web-version of some of our programs and considering HTML5 and Flash. Anyone know if it's even possible to record audio with HTML5? umm , it's pretty old news but i am just answering for posterity purposes . Google has proposed a Sound Capture API which is still under consideration under W3C HTML speech incubator group ( http://www.w3.org/2005/Incubator/htmlspeech/ ). Google also has posted a TTS example which works on Chrome beta http://slides.html5rocks.com/#speech-input all you have to do is < input id = "speech-input-field" type="text" x-webkit-speech /> A device element

Why certain .wav files cannot be decoded in Firefox

半腔热情 提交于 2019-12-01 03:59:45
问题 I have a web page which decodes wave files for certain reasons. Chrome and Safari seem to work fine. Firefox occasionally is unable to decode the file and gives the error: "The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully." I have created a jsfiddle which illustrates the issue: var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); var source; function getData() { source = audioCtx.createBufferSource(); request = new

How to retrieve a MediaStream from a Blob url?

主宰稳场 提交于 2019-12-01 03:43:42
It was possible to get an URL using window.URL.createObjectURL() from a stream like in below code. navigator.getUserMedia({ video: true, audio: true }, function (localMediaStream) { var video = document.querySelector('video'); video.src = window.URL.createObjectURL(localMediaStream); video.onloadedmetadata = function (e) { // Do something with the video here. }; }, function (err) { console.log("The following error occured: " + err); } ); Problem is now I have a blob URL like: blob:http%3A//localhost%3A1560/f43bed15-da6c-4ff1-b73c-5640ed94e8ee Is there a way to retrieve the MediaStream object

Is it possible to detect whether a browser tab is playing audio or not?

别说谁变了你拦得住时间么 提交于 2019-12-01 03:13:25
问题 I am looking for a way to detect whether a sound is being played in the current tab of Chrome. I would like to emphasize that the context is a web app and not a chrome extension nor a single audio element . My assumption is that the browser "knows" that the tab is playing sound by displaying an audible icon in the tab header, so I am guessing that there is some kind of browser HTML5 API for that. 回答1: Simple answer: no Long answer: Some-what-ish would be the best case in this context. Chrome

Is it possible to record sound with HTML5?

三世轮回 提交于 2019-12-01 03:05:51
问题 I'm considering a web-version of some of our programs and considering HTML5 and Flash. Anyone know if it's even possible to record audio with HTML5? 回答1: umm , it's pretty old news but i am just answering for posterity purposes . Google has proposed a Sound Capture API which is still under consideration under W3C HTML speech incubator group ( http://www.w3.org/2005/Incubator/htmlspeech/ ). Google also has posted a TTS example which works on Chrome beta http://slides.html5rocks.com/#speech

How do I play an audio file with jQuery?

坚强是说给别人听的谎言 提交于 2019-12-01 02:29:59
问题 I'm having a difficult time getting audio to work with jQuery. I've tried this with both .wav and .ogg formats. (Firefox 19.0.2) Clicking the Start button yields: TypeError: buzzer.play is not a function I'm not sure if jQuery selectors return an array, but I've tried the capture the audio file with both: var buzzer = $('buzzer'); and var buzzer = $('buzzer')[0]; Regardless, I can't get the audio elements to play. <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width

HTML5 - Get audio and video started together?

北战南征 提交于 2019-12-01 01:30:40
How would I go about getting audio and video started exactly at the same time using <audio> and <video> ? JavaScript is fine (and is probably needed). Thanks! You didn't say anything about file types so I used HTML-5 formats that work in Safari. <!DOCTYPE> <meta charset="UTF-8"> <title> audio video</title> <audio id="audioInHTML" controls="controls"> <source src="audio.wav" type="audio/wav"/> </audio> </div> <video id="videoInHTML" width="320" height="240" controls="controls"> <source src="movie.mp4" type="video/mp4" /> </video> <div id="playButtonDiv" </div> <form> <input type="button" value=

“Error: Unsupported audio type or invalid file path” for HTML5 Audio tag in Internet Explorer 10

强颜欢笑 提交于 2019-12-01 01:27:03
问题 I have the following html5 document with audio tag and a fallback to Flash for browsers that don't support it: <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> </head> <body> <audio autoplay controls preload="auto" autobuffer> <source src="trumpet.ogg" type="audio/ogg"> <source src="trumpet.mp3" type="audio/mp3"> <source src="trumpet.wav" type="audio/wav"> <source src="trumpet.m4a" type="audio/aac"> <!-- Flash fallback --> <object width="1" height=