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
Allow ExoPlayer only from more-info-camera #6974
Allow ExoPlayer only from more-info-camera #6974
Conversation
@bramkragten I don't have a frontend dev environment set up so I haven't tried this and it probably has some problems. But would something like this work? |
Yes, the code looks fine. I'll test it tomorrow. |
Can we check if the format is playable in the default browser player and only use exoplayer when needed? |
Was thinking about the backend, not sure what info is available there. |
Yes, the backend knows which codecs we are using, so if we start from there we can pass the relevant information forward. But I'm not sure if we want to do that - let's ask @hunterjm ? |
We could potentially send it as a part of the That would require a bit of a refactor though because while the stream worker knows what the video encoding is, it's not really passed up the chain. Either way, we could return whether or not the stream is H.264 or H.265, but then you would have to keep a mapping in the browser to determine support. H.265 is unsupported in everything except Safari, and with this PR Android using Exoplayer at the moment. Since we don't have workarounds for Chrome/Firefox/Edge, I'm not sure if it's worth the effort. |
@bramkragten Did the code work for you? As I mentioned, the change of |
It should work |
It wasn't working on my end, but it could have been some other problem. I'll try again with the dev docker image. |
Proposed change
Using ExoPlayer to play media draws over the webview, causing problems when elements such as the toolbar need to draw over the video element. The current implementation also does not handle scrolling.
This PR attempts to avoid these problems by only allowing ExoPlayer from more-info-camera.ts and not from ha-image.ts.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: