We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm trying to run my p5.js sketch as a chrome app but I get this error:
p5.sound.js:6392 MediaStreamTrack.getSources is deprecated. See https://www.chromestatus.com/feature/4765305641369600 for more details.
This is the code I was trying to run: mic = new p5.AudioIn();
Mic Test
var mic;
function setup() { createCanvas(400, 400); mic = new p5.AudioIn(); mic.start(); }
function draw() { background(0); fill(255, 0, 0, 255); ellipse(100, 100, 10, 10);
var vol = mic.getLevel(); vol *= 1000; fill(vol * 60, vol * 153, vol * vol * 180); ellipse(200, 200, vol * 100, vol * 100);
// console.log(vol); }
{ "name": "Mic Test", "description": "test your mic input level", "version": "0.0.1", "manifest_version": 2,
"icons": {
"16": "icon_128.png",
"128": "icon_128.png"
},
"app": {
"background": {
"scripts": ["main.js"]
}
},
"offline_enabled": true,
"permissions": ["audio"]
}