audiocontext

Change Audio From Multple Audio Tracks Video

断了今生、忘了曾经 提交于 2020-12-10 07:56:50
问题 i have videos with multiple audio tracks. i want to play the video and want change audio tracks from video. Is there any way to make this in html or there is html supported player for this? 回答1: There is an API for it, but it's not very supported. However, there is a plugin for video.js called videojs-audio-tracks, but it still uses the audioTracks API, which isn't supported by Chrome, and needs manual enabling in Firefox. 回答2: If you want to grab the audio track from an html5 video you can

Change Audio From Multple Audio Tracks Video

半腔热情 提交于 2020-12-10 07:56:30
问题 i have videos with multiple audio tracks. i want to play the video and want change audio tracks from video. Is there any way to make this in html or there is html supported player for this? 回答1: There is an API for it, but it's not very supported. However, there is a plugin for video.js called videojs-audio-tracks, but it still uses the audioTracks API, which isn't supported by Chrome, and needs manual enabling in Firefox. 回答2: If you want to grab the audio track from an html5 video you can

Frontend JavaScript request gets 302-redirected but ultimately fails

ε祈祈猫儿з 提交于 2020-07-09 14:29:48
问题 I'm trying to create an audio visualization for a podcast network, using the Web Audio API with createMediaElementSource() very similarly to the model explained in this tutorial. So far I've gotten it to work fine in Chrome, and you can see it here (note: click on the red box to start it). Update : Based on discussion in the comments, it’s now become clear that the problem happens because the request gets redirected to another URL, by way of a 302 redirect. However, Safari refuses to work,

Frontend JavaScript request gets 302-redirected but ultimately fails

左心房为你撑大大i 提交于 2020-07-09 14:29:26
问题 I'm trying to create an audio visualization for a podcast network, using the Web Audio API with createMediaElementSource() very similarly to the model explained in this tutorial. So far I've gotten it to work fine in Chrome, and you can see it here (note: click on the red box to start it). Update : Based on discussion in the comments, it’s now become clear that the problem happens because the request gets redirected to another URL, by way of a 302 redirect. However, Safari refuses to work,

How can I request user permission for audio on Chrome?

烈酒焚心 提交于 2020-05-25 08:10:11
问题 I am working on SAAS solution and I need customers to receive notification sounds from the application. Even if they just launched it without any interaction with it. Google has changed Chrome behaviour regarding this aspect and now user is required to click on webpage to get notification sounds. I have found out that it is possible to allow sounds explicitly here: and then user should enable sounds explicitly for your websites: Now user will not have to click to enable sound notifications.

createPanner with gainNode in safari

☆樱花仙子☆ 提交于 2020-01-16 13:13:08
问题 I want to pan left or right at a time and also set the volume for it, I have done it with other browsers but on safari createStereoPanner is not a function so i used createPanner for safari Now, Problem is that i want to use gain with panner to set volume currently its playing both gain and pan separately it should set gain for panner here is my code audioElement.setAttribute('src', '/Asset/sounds/calibrate.mp3'); audioElement.volume = 0.5; audioElement.play().then(function (d) { audioCtx =

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

Write a wav file in Node.js from an AudioBuffer

怎甘沉沦 提交于 2020-01-13 20:29:03
问题 I am new in Node.js programming and I am trying to convert a m4a file to wav file. I used audiobuffer-to-wav, and web-audio-api. This is my code: const fs = require('fs'); const toWav = require('audiobuffer-to-wav'); const AudioContext = require('web-audio-api').AudioContext; const audioContext = new AudioContext; let resp = fs.readFileSync('sample.m4a'); audioContext.decodeAudioData(resp, buffer => { let wav = toWav(buffer); console.log(buffer.length); console.log(wav); }); I want to know

Write a wav file in Node.js from an AudioBuffer

别等时光非礼了梦想. 提交于 2020-01-13 20:28:48
问题 I am new in Node.js programming and I am trying to convert a m4a file to wav file. I used audiobuffer-to-wav, and web-audio-api. This is my code: const fs = require('fs'); const toWav = require('audiobuffer-to-wav'); const AudioContext = require('web-audio-api').AudioContext; const audioContext = new AudioContext; let resp = fs.readFileSync('sample.m4a'); audioContext.decodeAudioData(resp, buffer => { let wav = toWav(buffer); console.log(buffer.length); console.log(wav); }); I want to know

Change sample rate of AudioContext (getUserMedia)

早过忘川 提交于 2020-01-09 13:02:11
问题 Im trying to record a 48000Hz recording via getUserMedia. But without luck. The returned audio MediaStream returns 44100Hz. How can i set this to 48000Hz? Here are snippets of my code: var startUsermedia = this.startUsermedia; navigator.getUserMedia({ audio: true, //sampleRate: 48000 }, startUsermedia, function (e) { console.log('No live audio input: ' + e); }); The startUsermedia function: startUsermedia: function (stream) { var input = audio_context.createMediaStreamSource(stream); console