AlexxIT / WebRTC

Home Assistant custom component for real-time viewing of almost any camera stream using WebRTC and other technologies.
https://github.com/AlexxIT/Blog
MIT License
1.41k stars 166 forks source link

Start streaming video on the card only through a "play" button #58

Open SmartM-ui opened 3 years ago

SmartM-ui commented 3 years ago

Hi Alex, would it be possible to start streaming video on the card only through a "play" button?

I noticed that when the camera is off (I only turn it on when I am away from home), and I view the card on Home Assistant, WebRTC always tries to view the video and tries to reconnect continuously to the webcam, increasing the CPU usage and consumption.

Even when I close Home Assistant, however, the CPU load remains high compared to when I don't see the WebRTC card.

I believe that to solve, in addition to the play button on the card, it is necessary to act at the integration level, as if it were momentarily deactivated. In fact, by deactivating it, the CPU load and consumption returns to "normal".

For info, I report that the ONVIF integration, when the webcam is off, the CPU load and consumption do not increase.

Thank you

Pe-MaKer commented 3 years ago

That would be great.

AlexxIT commented 1 year ago

CPU usage should be fixed in v3