修复bug「使用原生安装方式安装后,无法查看在线会话和历史会话」close #65
This commit is contained in:
parent
f81aedcac0
commit
f25fa9f318
@ -151,8 +151,6 @@ class Access extends Component {
|
|||||||
this.onWindowResize(null);
|
this.onWindowResize(null);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success('连接成功');
|
message.success('连接成功');
|
||||||
console.log('requestAudioStream')
|
|
||||||
this.requestAudioStream();
|
|
||||||
// 向后台发送请求,更新会话的状态
|
// 向后台发送请求,更新会话的状态
|
||||||
this.updateSessionStatus(this.state.sessionId).then(_ => {
|
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() {
|
render() {
|
||||||
|
|
||||||
const menu = (
|
const menu = (
|
||||||
@ -578,19 +558,21 @@ class Access extends Component {
|
|||||||
|
|
||||||
<Draggable>
|
<Draggable>
|
||||||
<Affix style={{position: 'absolute', top: 50, right: 100}}>
|
<Affix style={{position: 'absolute', top: 50, right: 100}}>
|
||||||
<Button icon={<ExpandOutlined/>} disabled={this.state.clientState !== STATE_CONNECTED} onClick={() => {
|
<Button icon={<ExpandOutlined/>} disabled={this.state.clientState !== STATE_CONNECTED}
|
||||||
this.fullScreen();
|
onClick={() => {
|
||||||
}}/>
|
this.fullScreen();
|
||||||
|
}}/>
|
||||||
</Affix>
|
</Affix>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
|
|
||||||
<Draggable>
|
<Draggable>
|
||||||
<Affix style={{position: 'absolute', top: 50, right: 150}}>
|
<Affix style={{position: 'absolute', top: 50, right: 150}}>
|
||||||
<Button icon={<CopyTwoTone/>} disabled={this.state.clientState !== STATE_CONNECTED} onClick={() => {
|
<Button icon={<CopyTwoTone/>} disabled={this.state.clientState !== STATE_CONNECTED}
|
||||||
this.setState({
|
onClick={() => {
|
||||||
clipboardVisible: true
|
this.setState({
|
||||||
});
|
clipboardVisible: true
|
||||||
}}/>
|
});
|
||||||
|
}}/>
|
||||||
</Affix>
|
</Affix>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
|
|
||||||
@ -599,7 +581,8 @@ class Access extends Component {
|
|||||||
<>
|
<>
|
||||||
<Draggable>
|
<Draggable>
|
||||||
<Affix style={{position: 'absolute', top: 100, right: 100}}>
|
<Affix style={{position: 'absolute', top: 100, right: 100}}>
|
||||||
<Button icon={<AppstoreTwoTone/>} disabled={this.state.clientState !== STATE_CONNECTED} onClick={() => {
|
<Button icon={<AppstoreTwoTone/>}
|
||||||
|
disabled={this.state.clientState !== STATE_CONNECTED} onClick={() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
fileSystemVisible: true,
|
fileSystemVisible: true,
|
||||||
});
|
});
|
||||||
@ -609,8 +592,9 @@ class Access extends Component {
|
|||||||
|
|
||||||
<Draggable>
|
<Draggable>
|
||||||
<Affix style={{position: 'absolute', top: 100, right: 150}}>
|
<Affix style={{position: 'absolute', top: 100, right: 150}}>
|
||||||
<Dropdown overlay={menu} trigger={['click']} placement="bottomLeft">
|
<Dropdown overlay={menu} trigger={['click']} placement="bottomLeft">
|
||||||
<Button icon={<DesktopOutlined/>} disabled={this.state.clientState !== STATE_CONNECTED}/>
|
<Button icon={<DesktopOutlined/>}
|
||||||
|
disabled={this.state.clientState !== STATE_CONNECTED}/>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
</Affix>
|
</Affix>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
@ -622,7 +606,8 @@ class Access extends Component {
|
|||||||
<>
|
<>
|
||||||
<Draggable>
|
<Draggable>
|
||||||
<Affix style={{position: 'absolute', top: 100, right: 100}}>
|
<Affix style={{position: 'absolute', top: 100, right: 100}}>
|
||||||
<Button icon={<AppstoreTwoTone/>} disabled={this.state.clientState !== STATE_CONNECTED} onClick={() => {
|
<Button icon={<AppstoreTwoTone/>}
|
||||||
|
disabled={this.state.clientState !== STATE_CONNECTED} onClick={() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
fileSystemVisible: true,
|
fileSystemVisible: true,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user