I have created something like MPD pad in javascript. And now I want to record sequences. I have tried to record all the keyups and keydowns, then duplicate existing layer of audio elements and then play them in the background according to recorded inputs. But is there any sound recording API to record output sound of browser so I could have a the sequence recorded into audio file?
It depends on how it's implemented. See http://www.html5rocks.com/en/tutorials/getusermedia/intro/
Related
I want to program a little browser game which needs some audio.
<audio id='my-audio' src='...'></audio>
That works on desktop and mobile but I have one problem: I can control this audio with the system audio controls. So when I press pause/play on my computer keyboard it affects this audio and on my phone's lock screen there appears a huge audio control widget. Is it possible to disable/remove these controls?
I also tried using
new Audio('...')
in Javascript instead of the audio-tag. That did not solve the problem.
I suggest using the Web Audio API. The link is to an example that I think covers a use case similar to what you requested. In addition to running the tutorial, I've also successfully used this API to read raw audio data (PCM array of float values) and play back on demand, which is a bit more involved than what you are asking. In either case, there was no issue with popups of any sort.
I want to make a web page where I display a video with options of multiple audio tracks where user can switch between different tracks available and just the audio will switch or maybe if possible video goes back 10 seconds and continues with selected audio track (eg. VLC player where we can select between different tracks).
How should i go about it? I read about VideoJs but couldn't understand how to do it.
It is not possible to add audio tracks through HTML like you can with text tracks. They must be added programmatically.
Video.js only stores track representations. Switching audio tracks for playback is not handled by Video.js and must be handled elsewhere - for example, videojs-contrib-hls handles switching audio tracks to support track selection through the UI.
Reference: https://docs.videojs.com/tutorial-audio-tracks.html
I've looked at many demos and every one of them when recording audio, plays back what you are saying at the same time. The issue with this is when recording without an external mic it causes the laptop's speakers and mic to interfere and spit out loud-ear piercing white noise.
Is there a way to record audio using html5 and javascript without having it playback while you record?
Is there a way to preload entire mp3 in html audio tag.
I'm having this problem for a long time. I have soundcloud player that uses html audio tag, im setting the audio source, the audio starts playing and the buffering starts.
The problem is that, soundcloud audio source is protected with short life token, when audio pre-buffer more data, buffering stops, when audio wants to continue reading the stream, it gets 404 from soundcloud and can't resume buffering.
I've noticed that if i pause the audio, whole track will be loaded at once, but this is not a solution that i need.
According to http://www.w3schools.com/tags/att_audio_preload.asp, you should set preload="auto".
Different browsers behave differently. Chrome buffers whole track on pause (for whatever reason). preload=auto does not do much but fills the buffer from the time url is set rather than on play event.
Flash is different. It loads whole track anyway. But it can not seek to unbuffered position because it can not do byte range requests. And it also wastes your and our bandwidth.
Alright, I'm working on one project which involves html5 audio, in addition to that a video is shown while audio is playing (Just video, no controls etc). Video is a visualisation (sometimes called equaliser) of audio that is playing, made beforehand in adobe after effects. both files (video and audio) are same length e.g. 3 min 20 sec. I need a way to synchronise both, as video might load slower than audio or vice versa. Therefore I need to make it so that on computers with slow internet connection if video stops loading at some point and starts buffering I need to pause audio, and once video resumes start audio again, both at exactly same time, also when user skips to a certain bit in a song, video should skip to that bit as well, I'll use custom api made player for video so there would be no controls on video, only on soundcloud player.
It is almost as if I was using soundcloud custom player to control video. I'm struggling to find any resources on this anywhere, and would really like to know how to achieve this functionality.
javascript or jQuery solutions are preferable.
What makes it even more complicated is that I use SoundCloud's custom player to play songs:
http://developers.soundcloud.com/docs/custom-player#
And upload videos to Vimeo/YouTube (all done to decrease load on a website)
Check here: http://html5demos.com/two-videos
The sample is for syncing 2 videos, but with some hacking probably you can manage to sync audio and video.
Second, don't use Custom player, make your own HTML5 Audio element, check the SoundCloud API there is a property stream_url for every streamable track on soundcloud, just put that URL as source on your html5 audio tag.
Keep on mind that this will not work on Firefox and Opera for some time. Firefox will integrate native mp3 support in v20, not sure about opera