-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Can I use a web browser instead of the Pi Camera app? #178
Comments
Yes, you can! I had a web-based UI actually, but I hadn't finished it yet, and then I switched to app implementation a few months ago. |
How? Shed some light plz 🙏 |
Could you opensource (or share) the code for the web UI version? This would enable accessing the video streaming from literally any device (instead of just android phone). |
I do have a plan to release a web UI/ios app that everyone can use like the Pi Camera app. Other features such as event trigger, motion detection, or p2p control gpio. However, I’m developing purely out of personal passion and ideals, without any funding or sponsorship. I’m only able to work on it during my spare time, the progress might be slower than expected. I hope this answers your question. |
Hi ! Really great project ! It works really well and I am impressed by the minimal delay it has ! Thank you very much |
Hi all! Using a web browser will be amazing. Could you please @TzuHuanTai share your web-based UI? Even if it is not finished yet, maybe people can have a start to continue developing and/or if you share here as a project, people can contribute by doing pull requests to always have a better web-based UI. Thank you in advance! |
that's great ! thanks a lot for all this work ! |
I have a question. Could you guys share some reasons/purposes why you need a Web UI? |
For me, I just want to be able to view the live feed on a bigger display and on any device, no matter the OS. |
Hello @TzuHuanTai I have some reasons (some the same as @samthelion17):
Taking advantage of the opportunity I would like to know two things: Reinforcing the item 5 above, Flutter is an example where you can write just one code (one project) and it can build a version for WebUI, Android, IOS, MacOS, Linux or Windows. I'm not an expert of FLutter, I did only some tests with it using their very simple examples, but Flutter is an example about a framework that generates builds for everything. |
Thank all the replies. Answer @beyonlo 's questions. |
Hi @TzuHuanTai, It looks great !
For me, I have a few reasons :
Hope this helps ! |
I see this as great project, I'll buy zero2W to try it. |
Thank you all guys. |
Here is the web ui: Pi Camera Web |
Hello @TzuHuanTai Sorry, maybe I had missed something during the evolution together with other guys about this issue. I did not find in this project on github (RaspberryPi_WebRTC) the source code of web ui. Is the web ui source code in another project, or is it mandatory to use the web ui hosted in your server so you do not publish the source code for us and we do not host it (and to do modifications) in our servers? |
The ui source code is not provided. |
Hi @TzuHuanTai ! Thanks for the work ! Please feel free to ask any question, I will try to help as much as I can.
Thank you very much EDIT : I did ended up having the sound working, not sure really how. I tried muting and unmuting it several times, on fullscreen mode and normal mode. It did work at the end, but I am not sure what is the issue and can't seem to replicate it now, as it loads the sound streaming with the video immediately. Maybe an issue with WebKit on iPhone taking long time to actually start streaming the sound/or failing to start streaming ? |
Hello @TzuHuanTai Is there the possibility that you please at least share a very simple working example of a web ui for us? Do not need any auth mode, beautiful, or any other feature, just a simple example opening a video and doing the MQTT over WebSocket, and STUN/TURN Server stuff to get the video stream on the browser. Let me please explain why that is important for me, and may be for others as well:
The project is yours and if you do not want to share even a very simple example (as a start point for us), I will understand - no problem. I know that there are the webrtc official samples, like as in this url, but unfortunately I'm not a good developer/frontend, plus MQTT and STUN/TURN Server configs, so if you share a ready very simple example as start point will be amazing. Thank you in advance! |
Sorry for the late reply. In fact, my client source code has hundreds or thousands of lines, which use different module, monitor connection status, and control a data transfer via datachannel. I assume the api look like this indeed simplify a lot of code: let videoElement = document.getElementById('videoElement');
const congif = {
rpiUid: xxxx,
mqttHost: xxxx,
mqttPort: xxxx,
....
};
let connObj = new PiCamera(congif);
connObj.attachMediaElement(videoElement);
connObj.connect();
connObj.snapshot();
connObj.onSnapshot((data:Uint8Array)=>{
...
});
connObj.disconnect(); This is the best way I've found so far, but I haven't made the decision to develop a package yet. There's still a lot of things need to take into account. |
I've tested the javascript client package for connecting to |
This would allow me to view the stream from a bigger screen, like a laptop for example. Just the other day I was testing mediamtx for a project like this, so far I'm liking your implementation better.
The text was updated successfully, but these errors were encountered: