-
-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add port to webcam url if port is not 80 #1566
fix: add port to webcam url if port is not 80 #1566
Conversation
i don't think, that this will work for all setups. i think this PR will also change the port for absolute paths, because it doesn't check if the URL is absolute or relative. |
As you can see URL constructor used with second parameter (baseUrl) https://github.com/mainsail-crew/mainsail/pull/1566/files#diff-fdc7a161a3e6714807dbdb170673c137562833dde75941a4b98626f4a6187d55R97 So the url can not be relative. Is not it? |
I really can't understand what the problem is that the request for camera data goes to the same port as all other requests in the application. That is, if my reverse proxy server for example listens on port 8081 and refers to mainsail, then all requests go to Also, some of the streamer components reference the current port: for example |
Yes, this is your special case, but when a user don't have the webcam on the same host or esp32-cams, you cannot overwrite your Webinterface port on the webcam address. |
I just now checked the link to the WebRTC CameraStreamer. Yes, this streamer is wrong. If you already do this fix, please fix all streamers for your use case. |
That is, you mean that my edit will work fine if the camera is on the same host as the mainsail, but there will be problems for cameras from other hosts?
Do you want me to add fixes to my PR? Which exactly? Remove port override? |
yes, especially if another port is used, it is always overwritten.
it would be nice, if you fix all webcams the same way and not only 1 client. |
@dictor93 any update here? |
…reamer Signed-off-by: Stefan Dej <[email protected]>
This PR fixes the URL for MJPEG adaptive streamer. When used port different then th "80". (Relevant current port added to the URL)