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

A way to toggle the Fullscreen mode with a service. #237

Closed
maxi1134 opened this issue Dec 8, 2021 · 3 comments
Closed

A way to toggle the Fullscreen mode with a service. #237

maxi1134 opened this issue Dec 8, 2021 · 3 comments

Comments

@maxi1134
Copy link

maxi1134 commented Dec 8, 2021

Is your feature request related to a problem? Please describe.
I currently switched to using this card to stream on multiple displays.
And in many instances, I want those displays to display the fullscreen mode in certain moments.
For instance when someone is at the door, or motion is detected at the back door!

I currently use conditionals cards, but with the initial loading time, the use is not ideal.

Describe the solution you'd like
A way to trigger the fullscreen action from somewhere else.
Or even based on conditions using templating

view_mode: >
    {% if is_state('sensor.front_persons', '0') %}
      normal
    {% else %}
      fullscreen
    {% endif %}

Describe alternatives you've considered
The use of the Conditional card was acceptable until the introduction of the "disableWebAssembly" fix, which seems to add an initial loading time

Additional context
Nothing more, but amazing work, and thanks a lot for the support!

@dermotduffy
Copy link
Owner

I'm afraid I think this is technically not feasible. The Javascript fullscreen API can only be activated by a human action. You can imagine the amount of abuse/spam there'd be if this protection was not present (e.g. visit a site and the spam/ad is instantly fullscreen).

I did a quick test of going to fullscreen without a human interaction, and Chrome logs:

Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture.

A [totally untested] trick could be to make a new dashboard in panel mode with a single instance of the card. That could be independently navigated to, and you could use something like browser-mod to control the navigation.

@dermotduffy
Copy link
Owner

Closing as not implementable for the reasons described.

@maxi1134
Copy link
Author

Sorry! Thought my answer has been sent.
I understand why it is not possible. Thanks for trying!

I will try to find a way to keep a conditional card pre-loaded!

@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants