Browse Source

Fixed not a function error on iOS 6 with Safari 5 which has AudioContext but no processor.

pull/32/head
Simon Eisenmann 11 years ago
parent
commit
d9e451a75d
  1. 2
      static/js/mediastream/usermedia.js

2
static/js/mediastream/usermedia.js

@ -33,7 +33,7 @@ define(['jquery', 'underscore', 'audiocontext', 'webrtc.adapter'], function($, _ @@ -33,7 +33,7 @@ define(['jquery', 'underscore', 'audiocontext', 'webrtc.adapter'], function($, _
// Audio level.
this.audioLevel = 0;
if (!this.options.noaudio && context) {
if (!this.options.noaudio && context && context.createScriptProcessor) {
this.audioSource = null;
this.audioProcessor = context.createScriptProcessor(2048, 1, 1);
this.audioProcessor.onaudioprocess = _.bind(function(event) {

Loading…
Cancel
Save