Export to GitHub

blockly - issue #272

testing window['Audio'] is not sufficient


Posted on Aug 12, 2015 by Grumpy Bird

See also Issue 34 (Jun 2012).

I've tried running blockly on a Windows Server 2012 R2 computer in Internet Explorer 11 (11.0.9600.17031), but it didn't work.

Debugging showed that the

var audioTest = new window['Audio']();

line in core/workspace_svg.js (in Blockly.WorkspaceSvg.prototype.loadAudio_) raised a short "Not implemented" exception.

The answer in http://stackoverflow.com/questions/20061959/js-audio-method-not-implemented-in-ie-10-of-server-2008-r2 says: "sound support has been disabled (the default in windows server)" and apparently the

if (!window['Audio']...

test is not enough in this case: window['Audio'] is a function, but window'Audio' raises exception.

Unfortunately this exception aborts proper initialization of blockly.

Please try-catch the body of Blockly.WorkspaceSvg.prototype.loadAudio_ or something inside.

Comment #1

Posted on Aug 20, 2015 by Happy Kangaroo

Thanks!

Status: Fixed

Labels:
Type-Defect Priority-Medium