CC-5338 : Uncaught SyntaxError: audio resources unavailable for AudioContext construction

creating a single global audio context to avoid resource problems.
This commit is contained in:
Naomi Aro 2013-09-24 18:50:41 +02:00
parent 24861545ce
commit e47b446804

View file

@ -3,6 +3,8 @@
A container object (ex a div) must be passed in, the playlist will be built on this element.
*/
var waveformPlaylistAudio = waveformPlaylistAudio || new (window.AudioContext || window.webkitAudioContext);
var Config = function(params) {
var that = this,
@ -10,7 +12,7 @@ var Config = function(params) {
defaultParams = {
ac: new (window.AudioContext || window.webkitAudioContext),
ac: waveformPlaylistAudio,
resolution: 4096, //resolution - samples per pixel to draw.
timeFormat: 'hh:mm:ss.uuu',