html5-audio

Audio tag in Facebook iOS in-app browser

℡╲_俬逩灬. 提交于 2019-12-23 17:54:26
问题 I have a webpage with an audio tag in it. It works fine in Mobile Safari. However, when I open the link from the Facebook app on iOS, it opens in the in-app browser. Here, the audio refuses to play. It will show that it's playing if the controls are showing but there's no audio. Video seems to work fine but the audio tag does not work. Is there a way to make this work or even to force the link to open in Mobile Safari instead? To try it out, share http://www.w3schools.com/html/tryit.asp

WebRTC control audio playback on android mobile device - chrome broswer

江枫思渺然 提交于 2019-12-23 17:49:50
问题 Android Chrome V(50.0.2661.89) has webRTC support. So i'm trying to set up Webrtc call between Mobile chrome browser and Desktop. All works good. But on Android mobile (Samsung S4, all event few more brands). audio output is coming on both Ear piece and External speaker . I could not control the output audio to playback only on Ear piece. Like normal mobile calls. <audio> tag has ability to set playback device id by using this HTMLMediaElement.setSinkId(sinkId).then(function() { ... }) but in

Audio event does not trigger jquery on play event

偶尔善良 提交于 2019-12-23 17:38:49
问题 I try to execute a function on an audio play event : jQuery('audio').on('play', function () { /* ... */ }); But my element is not present at the time this function is executed, so it's not selected. Instead I have the habit to use a different syntax when I need to trigger event for dynamic added content : jQuery('.constant-container').on('play', 'audio', function () { /* ... */ }); Where the .constant-container does not change. But this solution does not seems to work, the audio element does

MediaElement.js stop all players

笑着哭i 提交于 2019-12-23 12:37:55
问题 I've been playing around with MediaElement.js for a while now and have a new application that uses 20 players on a single page. I'd like to be able to have the songs stop when another one is played - and not to overlap the tracks when they are playing. I can't seem to find an easy way to hack this - perhaps someone knows of a way? Thanks. 回答1: In jQuery, you could do $('video,audio').each(function() { $(this)[0].pause(); }); Let me know if that works. 回答2: A quick and dirty one ;) $(".mejs

Audio Recording html5 on iOS

隐身守侯 提交于 2019-12-23 12:32:55
问题 I am attemping to access the microphone on iOS in order to capture user input. <input type="file" accept="audio/*;capture=microphone"> But whenever I click this I see the options (take photo or video, photo library) How can I access the microphone only? 回答1: As of IOS 8.3, it's not supported by Safari. http://caniuse.com/#search=getusermedia 来源: https://stackoverflow.com/questions/31248773/audio-recording-html5-on-ios

Why isn't my audio rewinding?

荒凉一梦 提交于 2019-12-23 09:29:46
问题 I'm having a bit of trouble rewinding audio in Javascript. I basically have a countdown that beeps each second as it gets towards the end of the countdown. I tried using; var bip = new Audio("http://www.soundjay.com/button/beep-7.wav"); bip.play(); but it didn't beep every second which I'm guessing has something to do withit having to load a new sound every second. I then tried loading the sound externally and triggering it with the following code. bip.pause(); bip.currentTime = 0; console

Convert audio data uri string to file

守給你的承諾、 提交于 2019-12-23 08:07:13
问题 The server saves the audio data as base64 data string. The mobile web client fetches the data and plays the audio. But found an issue in mobile Chrome in iOS and android that the audio with data uri can't play (issue). To make it work, I was wondering if there is a way in the client side to convert the data string to an audio file (like .m4a) and link the audio src to the file? 回答1: Figured out directly using the web audio api has the best compatibility across the mobile browsers in iOS and

best way to loop audio in the browser?

僤鯓⒐⒋嵵緔 提交于 2019-12-23 05:37:15
问题 I'm making a site that involves a lot of multi-tracked, audio loops. I'm wondering what the best way to implement these in (with javascript, etc)? should I use: -flash or some related flash library or -html5 audio or something else? it's very important that the audio loops be seamless what are some good libraries for this? In the past I've used soundmanager. The files will mostly be mp3s. 回答1: You can use the Web Audio API if you are content to sticking with WebKit browsers.. Here is some

JS Audio - audioBuffer getChannelData to frequency

烈酒焚心 提交于 2019-12-23 05:23:21
问题 bsd I am trying achieve pitch detection, and moreover learn some basic audio physics on the way, I am actually really new to this and just trying to understand how this whole thing works... My question is, What is exactly the audioBuffer and how is the data coming from getChannelData related to frequencies. and how can I extract frequency data from the audioBuffer... Also, if someone can explain just a bit about sample rates etc. also this would be great. Thanks! 回答1: An AudioBuffer simply

HTML5 Audio gets louder after pausing then playing again

时光毁灭记忆、已成空白 提交于 2019-12-23 03:12:13
问题 I'm making an audio player with JavaScript, everything works fine until I add a sound visualizer. When I pause the song and then play it again, the sound gets more louder every time I do it, until it gets distorsionated. I'm newbie with the HTML5 Audio API, I've tried to set the volume as a fixed value, but not works. The code of the visualizer it's: function visualizer(audio) { let context = new AudioContext(); const gainNode = context.createGain(); gainNode.gain.value = 1; // setting it to