Mercurial > hg > webaudioevaluationtool
comparison core.js @ 705:f38946647666
Added cross-browser support for webkit / non-webkit audioContext. Confirmed Chrome & Safari Support. Firefox: does not support innerText or dragging!
author | Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk> |
---|---|
date | Wed, 08 Apr 2015 18:18:17 +0100 |
parents | 375410a5571d |
children | f5de8699e2b6 |
comparison
equal
deleted
inserted
replaced
704:d24dc7fd97ae | 705:f38946647666 |
---|---|
14 window.onload = function() { | 14 window.onload = function() { |
15 // Function called once the browser has loaded all files. | 15 // Function called once the browser has loaded all files. |
16 // This should perform any initial commands such as structure / loading documents | 16 // This should perform any initial commands such as structure / loading documents |
17 | 17 |
18 // Create a web audio API context | 18 // Create a web audio API context |
19 // NORE: Currently this will only work with webkit browsers (Chrome/Safari)! | 19 // Fixed for cross-browser support |
20 var AudioContext = window.AudioContext || window.webkitAudioContext; | |
20 audioContext = new AudioContext; | 21 audioContext = new AudioContext; |
21 | 22 |
22 // Create the audio engine object | 23 // Create the audio engine object |
23 audioEngineContext = new AudioEngine(); | 24 audioEngineContext = new AudioEngine(); |
24 }; | 25 }; |