-
-
Notifications
You must be signed in to change notification settings - Fork 378
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
feat: add WebRTC (MediaMTX / rtsp-simple-server) webcam mode #1318
feat: add WebRTC (MediaMTX / rtsp-simple-server) webcam mode #1318
Conversation
Thx for you your PR! The main problem with WebRTC is that there are so many different "handshakes" for WebRTC. It's not possible to have one webrtc mode to support all streamers. I only would prefer to have a separate mode for this webcam style. It looks like the "wyze-bridge" is using the rtsp-simple-server in the background for the webrtc stream. So I think the name "WebRTC (rtsp-simple-server)" would be a good name for this mode. The mode "IP-Webcam" is for generic IP-Webcams. |
Fair enough... I didn't dig into all the details of the underlying protocols (just hacked together what worked from an example) but that makes sense. I'll look at refactoring this out to a separate camera type and update this PR. Thanks! |
Language file analysis report:
|
Updated as a new camera type. I think I poked around and found the necessary references that the camera types need expanded. Please take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general, this already looks very good. i added a few comments, but after that it should fit. i will try to install this streamer to be able to test this.
…playback but instead monitor panel collapse and component destroy.
Language file analysis report:
|
Language file analysis report:
|
Language file analysis report:
|
See how that is. I reworked the start/stop logic to track when the panel is actively collapsed vs. just scrolled out of view. I also had to make a small change to TheSettingsMenu.vue so that the component would be destroyed if you click on the 'x' to close to the settings dialog without either cancelling or updating the camera in the dialog first. I think this strikes a good balance between not reconnecting too frequently yet only keeping the streaming connection open if it stands to be displayed. I think I addressed all of the other comments. Thanks. |
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Language file analysis report:
|
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Language file analysis report:
|
Signed-off-by: Stefan Dej <meteyou@gmail.com>
I cleaned the file and added TS types as well as possible. Yesterday also, the project rtsp-simple-server was renamed to MediaMTX. So I also renamed it in this PR. I tested it with a newly installed MediaMTX with a raspberry webcam. Please double-check if it also works in your case, and then this PR will be merge-ready. |
Language file analysis report:
|
Language file analysis report:
|
Apologies for the delay in getting back here. I pulled the updates and installed them and it seems to work fine with my setup here and the wyze-bridge stream. I did notice 2 things however that were working better (in my opinion) prior to your updates:
I typically have mainsail up on 3 devices simultaneously: A monitor by the printer -- no camera needed there. I keep the Webcam panel minimized), my main PC in my office where I do most of my work, but monitor the printer from another room in my house, and then checking in from iPhone or iPad devices when I'm not in one of those places. Of the two issues, I think #1 should be looked at more closely and corrected for to be kind to users bandwidth and device needs, and #2 is more of a preference. |
@slynn1324 thx for your high-level feedback! You are right about point 1. I saw it as "unimportant" when refactoring and wanted to remove unnecessary complexity, but with your explanation of your workflow, this sounds very reasonable! Do you want to add this back, or should I do it? I intentionally removed the controls because not all functions work and would only lead to "wrong bug reports". I did the same with the WebRTC (camera-streamer) client. But I wouldn't know how to hide specific controls, so I removed them all. We can gladly enable them again if you know how to show and hide them to ensure 100% compatibility. |
If you want to add back #1 as you'd like it to be that'd be great. It might be a bit before I'm able to get back into the code. As for the controls - I would doubt there is a way to use only some of the native controls. On my iOS devices, it shows up with the native player controls which then allows full screen and pausing etc. It also displays that it's a live stream. Would this be something to consider an extra option in the webcam configuration panel about whether the native controls should be displayed or not? I could really see different users wanting it different ways... depending on their preferences. |
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Language file analysis report:
|
@slynn1324 i pushed a few changes to fix the closed panel behavior. it was included in the code, but with a bug. Please test the build again. |
Tested here and seems to be working fine. I would think this is good to merge whenever you're ready. |
Ok. I reviewed the code in detail and have found some little refactorings and one question. But the rest looks good to me. We also have to update this branch before merging it because other webcam clients were added to the developer branch, and there are merge conflicts right now. |
@slynn1324 any updates here? |
# Conflicts: # src/components/panels/WebcamPanel.vue # src/components/settings/SettingsWebcamsTab.vue # src/components/webcams/WebcamGrid.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Language file analysis report:
|
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Language file analysis report:
|
@slynn1324 can you share any information how to setup this webcam in wyze-bridge and which url you need to use in mainsail? |
@meteyou @slynn1324 Could you share instructions on how to setup? |
Adds support for ws://... urls in the IP Camera webcam type.
See #1317.