diff --git a/web/src/components/access/Access.js b/web/src/components/access/Access.js index fb30bbc..ae8b73a 100644 --- a/web/src/components/access/Access.js +++ b/web/src/components/access/Access.js @@ -151,8 +151,6 @@ class Access extends Component { this.onWindowResize(null); message.destroy(); message.success('连接成功'); - console.log('requestAudioStream') - this.requestAudioStream(); // 向后台发送请求,更新会话的状态 this.updateSessionStatus(this.state.sessionId).then(_ => { }) @@ -526,24 +524,6 @@ class Access extends Component { } } - requestAudioStream = () => { - let client = this.state.client; - // Create new audio stream, associating it with an AudioRecorder - const stream = client.createAudioStream('audio/L16;rate=44100,channels=2'); - const recorder = Guacamole.AudioRecorder.getInstance(stream, 'audio/L16;rate=44100,channels=2'); - - // If creation of the AudioRecorder failed, simply end the stream - if (!recorder) - stream.sendEnd(); - - // Otherwise, ensure that another audio stream is created after this - // audio stream is closed - else - recorder.onclose = () => { - console.log('audio closed') - }; - } - render() { const menu = ( @@ -578,19 +558,21 @@ class Access extends Component { -