Mercurial > hg > webaudioevaluationtool
comparison core.js @ 1701:86bad9132601
Added cross-browser support for webkit / non-webkit audioContext. Confirmed Chrome & Safari Support. Firefox: does not support innerText or dragging!
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Wed, 08 Apr 2015 18:18:17 +0100 |
parents | 4177fb1da6f8 |
children | f5de8699e2b6 |
comparison
equal
deleted
inserted
replaced
1700:348141682333 | 1701:86bad9132601 |
---|---|
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 }; |