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

Stream zoom functionality #1117

Closed
T-bond opened this issue Oct 28, 2020 · 10 comments
Closed

Stream zoom functionality #1117

T-bond opened this issue Oct 28, 2020 · 10 comments
Labels
enhancement New feature or request webview

Comments

@T-bond
Copy link
Contributor

T-bond commented Oct 28, 2020

Is your feature request related to a problem? Please describe.
I have multiple camera streams with high resolution. The new exoplayer working correctly displaying the H.265 stream which is great, as it does not work in the browser.
The only remaining problem is that I can't zoom into the camera view, which makes the cameras almost useless, as I can't see the details.
I tried with the new 0.117.0 which enables zooming, but it only works in the browser.

Describe the solution you'd like
I would like to zoom to the stream components / camera live views.

Describe alternatives you've considered, if any
There is no alternative, as the browser can't play the H.265 stream, and the app can't zoom in.

Additional context
I also tried enabling zoom with:

webview.settings.setSupportZoom(true)
webview.settings.builtInZoomControls = true

which zooms correctly, but the exoplayer layer won't follow the zoom.

@stale
Copy link

stale bot commented Mar 11, 2021

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 11, 2021
@T-bond
Copy link
Contributor Author

T-bond commented Mar 11, 2021

Functionality still needed.

@dshokouhi
Copy link
Member

So looks like to support something like this similar to what iOS does we may need to add some scaling options to App Configuration to handle this. Looking at Webview docs I think we may need to use:

https://developer.android.com/reference/android/webkit/WebView#setInitialScale(int)

For those seeing this issue please note this isn't just to zoom on a particular card or video stream, its to zoom into the entire HA frontend.

@T-bond
Copy link
Contributor Author

T-bond commented Apr 11, 2021

I think it won't be the best solution, as you said it will zoom into the whole frontend, but if it works I am in!
I am a bit worried if it will only scale the webview and it won't modify the canvas of the exoplayer, as it happened with my test:

webview.settings.setSupportZoom(true)
webview.settings.builtInZoomControls = true

And a similar issues is also open for the frontend: home-assistant/frontend#6612
But I think this maybe has to be handled differently because of the exoplayer.

Unfortunately I am currently still don't have enough time to investigate it further.
Also, if you missed there was some problem with the now removed zoom feature on iOS: home-assistant/frontend#8192 if this will be implemented the same way, maybe it would be a good idea to check for the same issues.

@dshokouhi
Copy link
Member

@uvjustin is something that can be supported by exoplayer and the app? You appear to be our expert in this area :) I dont believe scaling the WebView will be helpful here right?

@uvjustin
Copy link
Contributor

I think zooming along with the webview might be difficult and require a big refactor. Zooming into the video when ExoPlayer is fullscreen seems like it would be easier to do and would seem to satisfy the use case. I'll try look into it some more when I get a chance.

@conorlap
Copy link

@uvjustin any progress on this? Pinch to zoom for video feeds would be fantastic!

@dshokouhi
Copy link
Member

Hey all we just had #2252 deployed and I think that will satisfy this feature request, could someone please try the latest beta found on github to see if pinch to zoom is what was needed here?

@conorlap
Copy link

@dshokouhi yessss!! Just tried it out, works perfectly so far! Will update if any bugs. Thank you, I love this feature!! 🥳

@T-bond
Copy link
Contributor Author

T-bond commented Feb 17, 2022

Thanks everyone. It seems to be working perfectly. :)
<3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request webview
Projects
None yet
Development

No branches or pull requests

4 participants