p5.accessibility icon indicating copy to clipboard operation
p5.accessibility copied to clipboard

Error in Safari: createStereoPanner is not a function

Open catarak opened this issue 6 years ago • 0 comments

as reported by @limzykenneth:

Nature of issue?

  • Found a bug

Details about the bug:

The code execution on the page halts because of an error thrown by p5-accessibility.js which doesn't seem to work on Safari.

  • Web browser and version: Safari 12.0.1
  • Operating System: macOS Mojave
  • Steps to reproduce this bug: Code to reproduce:
function setup() {
  createCanvas(windowWidth, windowHeight);
}

function draw() {
  background(200)
  rect(0, 0, 20, 50 );
}

Error:

[Error] TypeError: audioCtx.createStereoPanner is not a function. (In 'audioCtx.createStereoPanner()', 'audioCtx.createStereoPanner' is undefined)
	(anonymous function) (p5-accessibility.js:1922)
	(anonymous function)
	draw (about:srcdoc:65)
	redraw (p5.min.js:9:19203)
	(anonymous function) (p5-accessibility.js:1631)
	(anonymous function) (p5-accessibility.js:1847)
	(anonymous function) (p5-accessibility.js:1979)
	(anonymous function) (p5.min.js:8:8386)
	(anonymous function)

Because of #801 it only shows as Script error. (: line 0) on the editor's console, making this error essentially silent for most users. Only happens on Safari when accessibility is enabled.

Maybe this belongs over at p5.accessibility and I'll move it over if so, I have not tried the p5.accessibility on its own outside the web editor. Although it would be great if the error can be caught so that it doesn't halt execution in this case.

catarak avatar Jan 15 '19 21:01 catarak