From f25fa9f31817026edee2ae094ac07a3160d19a3c Mon Sep 17 00:00:00 2001
From: dushixiang <798148596@qq.com>
Date: Fri, 5 Mar 2021 15:27:33 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug=E3=80=8C=E4=BD=BF?=
=?UTF-8?q?=E7=94=A8=E5=8E=9F=E7=94=9F=E5=AE=89=E8=A3=85=E6=96=B9=E5=BC=8F?=
=?UTF-8?q?=E5=AE=89=E8=A3=85=E5=90=8E=EF=BC=8C=E6=97=A0=E6=B3=95=E6=9F=A5?=
=?UTF-8?q?=E7=9C=8B=E5=9C=A8=E7=BA=BF=E4=BC=9A=E8=AF=9D=E5=92=8C=E5=8E=86?=
=?UTF-8?q?=E5=8F=B2=E4=BC=9A=E8=AF=9D=E3=80=8Dclose=20#65?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/src/components/access/Access.js | 49 ++++++++++-------------------
1 file changed, 17 insertions(+), 32 deletions(-)
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 {
-
- } disabled={this.state.clientState !== STATE_CONNECTED} onClick={() => {
- this.setState({
- clipboardVisible: true
- });
- }}/>
+ } disabled={this.state.clientState !== STATE_CONNECTED}
+ onClick={() => {
+ this.setState({
+ clipboardVisible: true
+ });
+ }}/>
@@ -599,7 +581,8 @@ class Access extends Component {
<>
- } disabled={this.state.clientState !== STATE_CONNECTED} onClick={() => {
+ }
+ disabled={this.state.clientState !== STATE_CONNECTED} onClick={() => {
this.setState({
fileSystemVisible: true,
});
@@ -609,8 +592,9 @@ class Access extends Component {
-
- } disabled={this.state.clientState !== STATE_CONNECTED}/>
+
+ }
+ disabled={this.state.clientState !== STATE_CONNECTED}/>
@@ -622,7 +606,8 @@ class Access extends Component {
<>
- } disabled={this.state.clientState !== STATE_CONNECTED} onClick={() => {
+ }
+ disabled={this.state.clientState !== STATE_CONNECTED} onClick={() => {
this.setState({
fileSystemVisible: true,
});