浏览代码

Merge branch 'master' of http://192.168.32.253:3000/Software/android-cloud-H5

heyang 4 年之前
父节点
当前提交
19f11e4c7b
共有 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) {