html5-audio

HTML5 Web Audio API, porting from javax.sound and getting distortion

不打扰是莪最后的温柔 提交于 2020-01-21 05:42:06
问题 I have a requirement to generate audio on the fly (generating from wav or mp3 files is not an option). Luckily the new WebAudio API (FF4 and Chrome 13) provides this functionality. I have some Java code i'm porting to Javascript that looks like this: byte[] buffer = new byte[]{ 56, -27, 88, -29, 88, -29, 88, -29 ............ }; AudioFormat af = new AudioFormat(44100, 16, 1, true, false); SourceDataLine sdl = AudioSystem.getSourceDataLine(af); sdl.open(af, 1470 * 4); //create 4 frame audio

CSS style <audio>

人走茶凉 提交于 2020-01-21 03:27:31
问题 is there a way how to style timeline thumb (seeker) of an <audio> tag? I'm able to target and style most of the element using audio::-webkit- shadow DOM pseudo selectors. However, I was unlucky finding a selector to match the playback timeline thumb. It's done by <input type="range"> , another shadow DOM element. So basically I'm trying to target shadow DOM pseudo element inside another shadow DOM pseudo element. My playground is on https://jsfiddle.net/cLwwwyh5/. I just need this to work in

In UWP saving HTML5 Audio stream to mp3 file

自闭症网瘾萝莉.ら 提交于 2020-01-16 13:18:32
问题 I currently have a radio streaming App in the Windows 10 Store. Now I want to give my users the possibility to record the current stream to a mp3 File. Does anyone of you have a suggestion on how to save the Audio Stream? I can't find the property or event that gives me the bytes to save them. I'm using the Windows.Media.Playback.Mediaplayer class. Thanks in advance Christian 回答1: In general you could not get Audio Stream from Mediaplayer directly. However, you could monitor the audio via

Why the web audio output from oscillator is not working as expected?

时间秒杀一切 提交于 2020-01-16 09:12:27
问题 Here is the code: I want to create an audio program that can play audio from very low frequency to high frequency. However, this code results in different output (even with the same device): The sound comes out suddenly - the expected result is it comes out gradually. I am sure my hearing is okay because I've asked my friends to hear; The audio sounds different on the same frequency. WARNING: Please adjust your volume to very low in case of any hurting before running this script. var audioCtx

Website HTML 5 Audio Autoplay

醉酒当歌 提交于 2020-01-16 05:22:31
问题 I have an intranet thats basically a web page on the amazon fire browser, and i want an audio file to autoplay when the page loads... <audio controls autoplay> <source src="alarm.ogg" type="audio/ogg"> <source src="alarm.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> This works fine on the desktop browsers, Chrome, Safari, etc. However, on the fire tablet (and my iPhone) the audio element is there but you have to press play, it doesn't autoplay. Any ideas

HTML5 Audio Tag - Start and end at position

蓝咒 提交于 2020-01-15 12:39:27
问题 I have a number of <audio> tags in my code and I would like to know if there is a way that I can set each one to have a custom start and end position as they all load the same file. This should happen without user interaction. effectively I need to deploy and <audio> tag and have something like data-start="04.22" data-end="09.45" 回答1: There is a timerange parameter available in MediaElement's src attribute which does exactly this. ://url/to/media.ext#t=[starttime][,endtime] Note that if you

How can I constantly update the duration of this mp3 file I'm playing with JS? The progress bar does not work

独自空忆成欢 提交于 2020-01-15 10:43:39
问题 This is script from an audio player. I got from the Jquery cookbook that I can't seem to get working. I'm really stumped and would appreciate any help. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery- ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"> </script> </head> <body> <script> var

How can I constantly update the duration of this mp3 file I'm playing with JS? The progress bar does not work

别来无恙 提交于 2020-01-15 10:43:37
问题 This is script from an audio player. I got from the Jquery cookbook that I can't seem to get working. I'm really stumped and would appreciate any help. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery- ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"> </script> </head> <body> <script> var

Audio tag without a volume slider or mute button?

浪尽此生 提交于 2020-01-15 07:05:13
问题 I created an audio tag without a download button with <audio controls controlslist="nodownload"> This was successful. Now, how do I remove the volume slider (plus mute button) that comes up when I play the sound? I tried <audio controls controlslist="novolume"> without any luck. 回答1: The new controlslist attribute in the HTML5 standard can only accept three settings: "nodownload", "nofullscreen" and "noremoteplayback". There are none to control specific controls beside from that. The only

Saving sounds played in sequence as one audio file

不想你离开。 提交于 2020-01-15 06:14:05
问题 Lets say I created a program that plays one sound after another. Is it possible, without the use of 3rd party libraries, to somehow export the sound as wav or mp3? I am trying to build a little sequencer, but before I do, I need to know if this is possible. I already did my research and found many 3rd party libraries, the most famous seems to be recorder.js. For the sake of learning, I prefer to use the pure api. 回答1: Well these can be done with HTML 5 user media api's. Here is a intro from