mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-23 01:21:40 +00:00
Fix thinclient address in dev builds and move thinclient (#586)
* Fix thinclient address in dev builds and move thinclient Update USBFrameProvider.java Create index.html Update index.html Null check stream to prevent spam * Update main.yml Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
This commit is contained in:
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
@@ -282,9 +282,6 @@ jobs:
|
||||
name: built-client
|
||||
path: photon-server/src/main/resources/web/
|
||||
|
||||
# Copy thinclient in as well
|
||||
- run: cp -r photon-thinclient/* photon-server/src/main/resources/web/
|
||||
|
||||
# Download docs artifact to resources folder.
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -17,6 +17,7 @@
|
||||
data() {
|
||||
return {
|
||||
seed: 1.0,
|
||||
src: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -73,7 +74,7 @@
|
||||
},
|
||||
mounted() {
|
||||
var wsvs = require('../../plugins/WebsocketVideoStream');
|
||||
this.wsStream = new wsvs.WebsocketVideoStream(this.id, this.port, window.location.host);
|
||||
this.wsStream = new wsvs.WebsocketVideoStream(this.id, this.port, this.$address);
|
||||
},
|
||||
unmounted() {
|
||||
this.wsStream.setPort(0);
|
||||
|
||||
@@ -4,6 +4,7 @@ export class WebsocketVideoStream{
|
||||
|
||||
|
||||
constructor(drawDiv, streamPort, host) {
|
||||
console.log("host " + host + " port " + streamPort)
|
||||
|
||||
this.drawDiv = drawDiv;
|
||||
this.image = document.getElementById(this.drawDiv);
|
||||
@@ -205,6 +206,7 @@ export class WebsocketVideoStream{
|
||||
}
|
||||
|
||||
ws_onMessage(e){
|
||||
console.log("Got message from " + this.serverAddr)
|
||||
if(typeof e.data === 'string'){
|
||||
//string data from host
|
||||
//TODO - anything to receive info here? Maybe "available streams?"
|
||||
|
||||
@@ -72,7 +72,9 @@ public class SocketVideoStreamManager {
|
||||
if (port != null && port != NO_STREAM_PORT) {
|
||||
var stream = streams.get(port);
|
||||
userSubscriptions.put(user, NO_STREAM_PORT);
|
||||
stream.removeUser();
|
||||
if (stream != null) {
|
||||
stream.removeUser();
|
||||
}
|
||||
} else {
|
||||
logger.error(
|
||||
"User attempted to unsubscribe, but had not yet previously subscribed successfully.");
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<p>Docs have not been copied!</p>
|
||||
@@ -1 +1 @@
|
||||
<p>UI has not been copied!</p>
|
||||
<p>UI has not been copied!</p>
|
||||
|
||||
Reference in New Issue
Block a user