huangxiaojing преди 4 години
родител
ревизия
d7c235f364
променени са 1 файла, в които са добавени 5 реда и са изтрити 8 реда
  1. 5 8
      screenIos/pcm-player.js

+ 5 - 8
screenIos/pcm-player.js

@@ -47,14 +47,11 @@ PCMPlayer.prototype.getTypedArray = function () {
 };
 
 PCMPlayer.prototype.createContext = function () {
-    var handleSuccess = function (stream) {
-        this.audioCtx = new (window.AudioContext || window.webkitAudioContext)();
-        this.gainNode = this.audioCtx.createGain();
-        this.gainNode.gain.value = 1;
-        this.gainNode.connect(this.audioCtx.destination);
-        this.startTime = this.audioCtx.currentTime;
-    }
-    navigator.mediaDevices.getUserMedia({audio: true, video: true}).then(handleSuccess);
+    this.audioCtx = new (window.AudioContext || window.webkitAudioContext)();
+    this.gainNode = this.audioCtx.createGain();
+    this.gainNode.gain.value = 1;
+    this.gainNode.connect(this.audioCtx.destination);
+    this.startTime = this.audioCtx.currentTime;
 };
 
 PCMPlayer.prototype.isTypedArray = function (data) {