Added proper state machine to websocket video stream to control connect/disconnect sequence better. (#561)

This commit is contained in:
Chris Gerth
2022-11-03 15:05:17 -05:00
committed by GitHub
parent e971db2f52
commit a64697e714
4 changed files with 290 additions and 100 deletions

View File

@@ -65,9 +65,9 @@
disconnected(newVal, oldVal){
oldVal;
if(newVal){
this.wsStream.stopStream();
this.wsStream.setPort(0);
} else {
this.wsStream.startStream();
this.wsStream.setPort(this.port);
}
}
},
@@ -76,8 +76,7 @@
this.wsStream = new wsvs.WebsocketVideoStream(this.id, this.port, window.location.host);
},
unmounted() {
this.wsStream.stopStream();
this.wsStream.ws_close();
this.wsStream.setPort(0);
},
methods: {
reload() {