Refact. Flutter web, mid commit (#7482)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2024-03-23 10:08:55 +08:00
committed by GitHub
parent 1c3a2e475d
commit a15cd62fd4
8 changed files with 187 additions and 68 deletions

View File

@@ -443,9 +443,9 @@ export default class Connection {
if (this._videoTestSpeed[0] >= 30) {
console.log(
"video decoder: " +
parseInt(
"" + this._videoTestSpeed[1] / this._videoTestSpeed[0]
)
parseInt(
"" + this._videoTestSpeed[1] / this._videoTestSpeed[0]
)
);
this._videoTestSpeed = [0, 0];
}
@@ -456,6 +456,7 @@ export default class Connection {
}
handlePeerInfo(pi: message.PeerInfo) {
localStorage.setItem('last_remote_id', this._id);
this._peerInfo = pi;
if (pi.displays.length == 0) {
this.msgbox("error", "Remote Error", "No Display");
@@ -540,6 +541,15 @@ export default class Connection {
return this._options[name];
}
// TODO:
getStatus(): String {
return JSON.stringify({status_num: 10});
}
// TODO:
checkConnStatus() {
}
setOption(name: string, value: any) {
if (value == undefined) {
delete this._options[name];