html5-audio

JavaScript / HTML5 audio: play mp3 file loaded by user via file selector in Android Chrome

那年仲夏 提交于 2019-12-12 09:44:50
问题 I am trying to create a site where user can select a local audio file from their PC or tablet and (without uploading the file to the server) play that file using HTML5 audio tag (user is supposed to click the button to play it, autoplay feature is not needed). I am not able to achieve this in Android version of Chrome despite the fact that this browser should support everything that is needed. In desktop version of Chrome it works. I have tried different methods how to load that file: via

Why does audio.buffered.end(0) get an error message when I try to get buffered time

…衆ロ難τιáo~ 提交于 2019-12-12 07:33:32
问题 I'm building mp3 playlist player with HTML5 and jQuery. At this player there is a horizontal bar grow gradually in conjunction with the buffered present of mp3 file. here is my full code: get buffered end HTML5: <audio id="music" controls> <source src="https://archive.org/download/musicTestAudio27/Very%20nice%20%2827%29.mp3" type="audio/mpeg"> </audio> <br/> <div id="buffered"></div> CSS: #buffered{ border:solid #ccc 1px; height:10px; background:red; display:block; width:1%; } Javascript: var

Capture Audio Input with flash or html5

风流意气都作罢 提交于 2019-12-12 07:20:02
问题 I am trying to capture the microphone and send the recording to my server.. I tried this method here but it records only a big WAV and the upload can be slow sometimes. Is there a way to capture the voice and compress it on the client side? Best method would be to send the recording while recording, but I have no Idea if this is possible. (It works for YouTube Live Webcam recording, it must work for Audio only too..) 回答1: Hey check out this post where i replied to a guy with a similar

HTML 5 Audio Player and Android/iOS

十年热恋 提交于 2019-12-12 06:35:58
问题 my question is: Can the HTML5 Audio Player play files from the device. So if the user downloads a audio file from a website and save it on the device can the player read and play this file in offline modus(without internet)? The player is in an WebApp. thanx newone 回答1: Android and iPhone has WebKit based browser and should support File API You can ask user to open file, and read it as DataURL using File API, described above. <input type="file" id="file" /> <script> player = new Audio();

Audio is unable to play via javascript on some mobile browsers

北城以北 提交于 2019-12-12 04:21:11
问题 I'm trying to do a simple thing. I want some audio to play exactly after 10 seconds when the user enters the webpage. I used the following code var aud=new Audio("someAudio.mp3"); $(document).ready(function(){ setTimeout(function(){aud.play()}, 10000); }); It is working perfectly fine on desktop browsers. However, the audio is not playing in some mobile browsers like Google Chrome though it is working in Firefox. What may be the possible reason for this and how to fix it? I saw some similar

Stream audio files from my home computer to my website

好久不见. 提交于 2019-12-12 03:39:29
问题 Hello! I have a couple of questions regarding a website I have been building that requires audio files to be echoed onto my HTML using PHP after referencing my SQL database. To begin, my page has an audio control tag that has a php echo inside of it, like so: <audio controls> <source src="audio/<?php echo $file; ?>" type="audio/mp3"> </audio controls> the variable $file is equal to the audio file the user wants to play after they fill out a select form on a different page, which is pulled

HTML5 audio tag not playing sound for the very first of unfocused tab in chrome and safari?

房东的猫 提交于 2019-12-12 03:26:25
问题 I want to play a sound in my application whenever a tab is available in browser irrespective focus. I am using HTML 5 audio tag to play the sound. But chrome and safari defer the audio playing until the user navigate or focus to the tab. The entire audio request to play sound is played at a time of tab focus. It becomes too noisy when you hear lot of sound playing at a time. Is it possible to play a sound from unfocused tab without browser defer nature? Suggest me any alternative solution

Server does not read ogg file

时间秒杀一切 提交于 2019-12-12 02:57:59
问题 I am trying to play audio with HTML5 audio tag; reading different articles made me aware that Firefox does not play mp3, but plays ogg file so I linked two files to make it compatible with Firefox: Here's y code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Audio Player</title> </head> <body> <audio id="Mp3Me" autoplay autobuffer controls> <source src="audio/audio.mp3"> <source src="audio/audio.ogg"> </audio> </body> </html> I have two separate servers, the first one can read

html5 player with autoload not working

烈酒焚心 提交于 2019-12-12 02:53:36
问题 I am using this html5 audio player http://osvaldas.info/audio-player-responsive-and-touch-friendly I have problem with that. When i put there "autoload" its not working and player play two time. Here is html5 code: <audio autoplay="autoplay" preload="none" controls="" class="sppaudioplayer" id="spp-audio-player"><source src="http://www.blogtalkradio.com/girlsinheels/2016/04/12/one-girl-two-boots.mp3"></source></audio> Here is javascript code: $( function() { $( 'audio' ).audioPlayer(); });

Is Chrome and Firefox do not load the change in media source?

爱⌒轻易说出口 提交于 2019-12-12 02:43:36
问题 I tried this code in IE10 it works fine but not in Chrome or Firefox, if we made a call directly for the Google tts API URL in the Chrome or Firefox browser, it works first time only and then it will only load the same text from the script, if any change for the submitted text has happened from the script, no reading will occur. see the example below please! <head> <script> // audio= new Audio(); function playit() { var toread=document.getElementById('texttoread').value; var audio = new Audio