html5-audio

HTML5/jQuery audio shuffle onClick

匆匆过客 提交于 2019-12-11 07:45:45
问题 I have a simple HTML5 audio playlist and I would like the user to click a "shuffle" button and shuffle the audio but I don't know the best way to go about this. I'm using audio.js for HTML5 audio. http://jsfiddle.net/HxVaj/4/ As you can see in the fiddle, audio.js grabs the <a> tag inside the <li> to play an audio file in the player at the top. The shuffle button would need to pick a random <li a> on click. Any help would be greatly appreciated! Thank you! 回答1: Here is the logic for shuffle

HTML 5 audio.playbackRate not working in iPad but works on Safari on Windows

為{幸葍}努か 提交于 2019-12-11 06:59:26
问题 Following code does not have any effect (audio continues to play in the same manner before pressing the PlayFast button iPad. It works beautifully on Safari on windows box function playFast() { var myVideo = document.getElementsByTagName('audio')[0]; myVideo.playbackRate = myVideo.playbackRate + 1; alert(myVideo.playbackRate); } Initially the playbackRate is set to 1 Can any one please help. 回答1: Playback Rate in JavaScript You can set the audio or video playbackRate property to nonzero

Possible memory leak or something else?

耗尽温柔 提交于 2019-12-11 06:43:45
问题 I've made a visualizer in javascript that when you select a music directory your're able to select files within that directory to play and have the visualizer move to. But it would seem after loading a directory and then changing the song more than 4 times Results in less responsive movement from the visualizer. I'm unsure why this is happening. Heres an example of this happening. Keep changing the song from the drop down box until you see it starting to slow. window.onload = function() { var

How can I allow <audio> elements with HTML Purifier?

◇◆丶佛笑我妖孽 提交于 2019-12-11 05:27:59
问题 How can I allow elements with HTML Purifier? I have tried $config->set('HTML.Allowed', 'audio'); , but now it will delete all other elements including <p>, <br> etc. I then tried $def->addAttribute('audio', 'src', 'CDATA'); but it's not working. 回答1: HTML.Allowed is a whitelist of all allowed tags, so what you presumably want to do is concatenate $config->get('HTML.Allowed') with ,audio as a value. That said, HTML Purifier's approach to security is HTML flavour aware - as in, rather than just

Javascript - Seek audio to certain position when at exact position in audio track

ε祈祈猫儿з 提交于 2019-12-11 05:18:29
问题 Scenario: Audio starts playing from 0:00 . At exactly 0:05 , the track skips forwards to 0:30 . The track immediately starts playing at 0:30 , and at exactly 0:35 , the track skips backwards to 0:05 and plays the rest of the audio file Summary: Play: 0:00 to 0.05 , Skip: 0:05 to 0:30 , Play: 0:30 to 0:35 , Skip: 0:35 to 0:05 , Play: 0.05 to END The real problem comes when there is the need for a immediate and seamless skip. For example, setTimeout is very inaccurate and drifts meaning it

Is it possible to play this stream using HTML5/javascript?

让人想犯罪 __ 提交于 2019-12-11 02:51:28
问题 Basically trying to play some live audio streams in an app I'm porting to the browser. Stream example: http://kzzp-fm.akacast.akamaistream.net/7/877/19757/v1/auth.akacast.akamaistream.net/kzzp-fm/ I have tried HTML5 audio tag and jPlayer with no luck. I know next to nothing about streaming audio, however, when I examine the HTTP response header the specified content type is "audio/aacp" (not sure if that helps). I'm hoping someone with more knowledge of audio formats could point me in the

Html5 audio+ Phonegap + Android?

十年热恋 提交于 2019-12-11 02:12:14
问题 does the HTML5 audio tag with Jquery and Phonegap work to create an Android App? It works well in any browser, but I can't hear anything using the Android emulator, any idea? thank you! 回答1: No, the audio tag is not supported everywhere, and probably not on your Android device. I found this blog on Android and audio support useful, plus he's got snippet of test code. Run in any browser, including Android browser, to see what's supported. I used PhoneGap / Android / jQuery Mobile to write this

How can I determine if standard audio player is playing a song

我们两清 提交于 2019-12-11 02:07:39
问题 I have the following as part of my html (once for each of several songs): <audio name="aMedia" id="aMedia" controls preload="auto"> <source src="audio/mysong.m4a"> </audio> I wish to determine if the above standard Play button was pressed to play a song. If it was, I need to first stop all other songs that may be playing, e.g., function stopAllSongs() { var allMedia = document.getElementsByName(theMedia), thisMedia; for (m=0; m < allMedia.length; m++) { thisMedia = allMedia[m]; if (thisMedia

IE 9 has trouble loading HTML5 audio from Tomcat

早过忘川 提交于 2019-12-11 01:14:33
问题 My HTML5 audio player, when running inside of IE9, has trouble playing audio files located on a server running Apache Tomcat. For example, it'll never load the file at this path: http://www.siascend.com/repository/audios/1017_Q1.mp3 but happily plays the same file located @: http://hirebrodie.com/demo/audio/1017_Q1.mp3 Either path works fine when the player runs in Chrome or Safari. Why wouldn't it work in Internet Explorer? Is this a known issue with the IE implementation of HTML5 audio? 回答1

how to play multiple mp3/songs in HTML? [duplicate]

北城余情 提交于 2019-12-11 00:36:53
问题 This question already has answers here : HTML 5 video or audio playlist (10 answers) Closed 3 years ago . I'm trying to get my website to play multiple mp3/songs, but it keeps playing soundtrack1, but I want it to play all 3 songs at the same time. This is what I currently have: <audio loop autoplay controls> <source src="soundtrack1.mp3" type="audio/mpeg" loop="true"> <source src="soundtrack2.mp3" type="audio/mpeg" loop="true"> <source src="soundtrack3.mp3" type="audio/mpeg" loop="true">