Skip to content
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

[BUG] Camera stream issue when header is disabled #244

Closed
erich74 opened this issue Jun 22, 2024 · 10 comments
Closed

[BUG] Camera stream issue when header is disabled #244

erich74 opened this issue Jun 22, 2024 · 10 comments
Labels
invalid This doesn't seem right

Comments

@erich74
Copy link

erich74 commented Jun 22, 2024

Describe the bug
I have a couple of dashboards with a camera live stream entity (Go2RTS) / RSTP .
I have noticed that whenever the header (top) is disabled, the stream is not working. As soon as I re enable the header, camera live stream is working fine again.
This is very strange because I have also tested with the WallPanel HACS (https://github.com/j-a-n/lovelace-wallpanel) and this is the exact same issue. Side panel for instance does not affect the live stream, only the top banner.

To Reproduce
Steps to reproduce the behavior:

  1. Create a dashboard containaing a live camera feed (RTSP)
  2. Enable kiosk mode (yaml or url query) with hide_header: true

Versions:

  • Home Assistant: 2024.6.3
  • Kiosk-Mode 6.0.1
@erich74 erich74 added the 🐛 bug Something isn't working label Jun 22, 2024
@elchininet
Copy link
Collaborator

@erich74,
Could you post a screenshot of your dashboard? I'll try to reproduce it. In theory a CSS override of the header should not affect anything from the entities or cards but I need to reproduce it first to see why it happens.
Regards

@erich74
Copy link
Author

erich74 commented Jun 23, 2024

Sure, here is a screenshot
Thanks

image

@elchininet
Copy link
Collaborator

Thanks @erich74,
So, it is just a card with a streaming. And what happens when you hide the header? Does it disappear?

@erich74
Copy link
Author

erich74 commented Jun 24, 2024

yes I am using Go2RTC integration with the WebRTC custom card to stream my camera video.
If I hide headers video is freezing (live streaming does not work anymore / gets stuck)

@elchininet
Copy link
Collaborator

Hi @erich74,
I suspect that this is coming from the WebRTC integration. This custom-plugin just adds a CSS style override to the header and that should not be any interference. Could you check if you have any warning/error in the console when the stream stops?

@erich74
Copy link
Author

erich74 commented Jun 25, 2024

I do not have any warning/error but I suspect my tablet is also not very capable of supporting the live stream (this is a rather old android 10 teclast tablet). I have noticed that even with headers if I scroll up or down on my dashboard the stream starts hanging.
There might also be something with the custom integration as you mentioned because when the header is removed I do not have any live stream at all, the camera hangs right at the beginning.
I have re-enabled the header for the moment and do not have any problem, this is not such a big deal. I just wanted to get more real estate but I can reorganize my dashboard to get some additionnal space.
Thanks again for your time and this great custom integration!

@elchininet
Copy link
Collaborator

elchininet commented Jun 25, 2024

Hi @erich74,

If it is a tablet, then you have not checked the right console 🙂

I was referring to the browser's dev console, but that is difficult to get in a tablet with the native Android app.

What you described about the hanging ocurring also when you scroll confirmed me that it is related to the custom integration. There is a specific block of code that disconnects the stream and tries to connect it again when there are changes in the visibility of the video stream, and that occurs when you scroll or when the layout changes because some elements are added/removed (I think that this issue is related to the same).

Try this to see if it improves:

In the configuration of the custom card, set the intersection option to 0. That will disable completely the visibilityThreshold logic. Let me know if you notice any improvements disabling that function.

Regards

@erich74
Copy link
Author

erich74 commented Jun 26, 2024

oops sorry when you said console I thought you were referring to Home Assistant logs. Now I understand you're talking about the browser console. And yes this might be complex to get it from the Android tablet :)
I'll try out your tip and report back
Thanks

@erich74
Copy link
Author

erich74 commented Jun 26, 2024

I have done some more testing.
I have put intersection option to 0 and re-enabled kiosk mode on my Android tablets.
What I noticed is that it did work! (no stream hanging) but I also noticed that even with intersection option to 0, when on the same dashboard I enable 'animated icons' for my weather entity, then the stream hangs again.
I do not care too much about animated icons (even though I would be interested to understand why it makes my video stream hang) so now kiosk mode is activated (no sidebar, no header) and my camera stream is working fine!!!
Thank you so much for your time and support (and of course for this great kiosk custom entity!).

@elchininet
Copy link
Collaborator

Hi @erich74,
Good to hear that :)
I really don't know what could be the cause of the issue that you are having with the animated icons. You can find support for that in the WebRTC repo, they should know better what could be the cause of that.
Regrads and closing this issue.

@elchininet elchininet added invalid This doesn't seem right and removed 🐛 bug Something isn't working labels Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants