Skip to content
Advertisement

Tag: audio

How to send audio blob from javascript to python?

I want to send a audio blob from JS to python script (which runs on server). My JS ajax .. looks something like this. and my python script looks like this. Right now, I am just testing, so it should get me the duration of the audio file. The blob is generated through record.js This is not working, as the

Detect sound is ended in THREE.PositionalAudio?

I want to detect when sounds is ending, but all examples that i found not working. Live example: http://codepen.io/anon/pen/wMRoWQ Answer Three.Audio is wrapper around a buffer source audio object. https://github.com/mrdoob/three.js/blob/ddab1fda4fd1e21babf65aa454fc0fe15bfabc33/src/audio/Audio.js#L12 It looks like it overrides the onended event and binds it to its own function, so we just do the same: We set isPlaying = false because this is what

Why don’t audio and video events bubble?

I was wondering why some Javascript of mine would not work until I figured that the audio events did not bubble up the DOM tree, e.g. the timeupdate-event. Is there a rationale for not letting the events of the audio- and video-tag bubble? Answer The reason why event bubbling exists is solve the ambiguous question of which element is the

How to play a notification sound on websites?

When a certain event occurs, I want my website to play a short notification sound to the user. The sound should not auto-start (instantly) when the website is opened. Instead, it should be played on demand via JavaScript (when that certain event occurs). It is important that this also works on older browsers (IE6 and such). So, basically there are

How do I remove properly html5 audio without appending to DOM?

With Javascript, I have a function that creates an audio element with createElement(“audio”), and start playing in loop without using appendChild(), I mean without appending it to the DOM. The element created is kept in a variable, let’s called it music1: What I would like to do, is to change the music played, if possible using the same function, and

Advertisement