mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-22 01:11:40 +00:00
Added proper state machine to websocket video stream to control connect/disconnect sequence better. (#561)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user