Can't run p5.sound.js mic test app in chrome os app due to depreciation

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

Test your mic!

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"]

}

Sign In or Register to comment.