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

add autoplay-policy option to chromedp flags #99

Merged
merged 1 commit into from
Mar 25, 2023
Merged

add autoplay-policy option to chromedp flags #99

merged 1 commit into from
Mar 25, 2023

Conversation

legnoh
Copy link
Contributor

@legnoh legnoh commented Feb 27, 2023

Hi, I would like to make one suggestion regarding the Chrome startup flag when grafana-kiosk starts.

Problems

Currently, I am trying to use a video plugin to play YouTube videos on my grafana-kiosk dashboard.

However, Chrome has an Autoplay policy, and if I want to autoplay videos embedded in <iframe> or <video> tags, I need to satisfy the following conditions beforehand.

It is very difficult to satisfy these conditions stably with the current grafana-kiosk, that is, to make videos play in the intended state. In the first place, grafana-kiosk starts Chrome in Incognito mode, so it is not possible to avoid this problem by improving Chrome's MEI (Media Engagement Index) even after playing videos several times.

Suggestion

I would like to set the flag --autoplay-policy=no-user-gesture-required introduced above as the default flag when Chrome starts. By enabling this flag, videos specified in Grafana will be able to play regardless of the policy on the Chrome side.

Concerns

Setting this flag may cause problems, such as increased network data consumption, as videos are automatically loaded. However, when specifying a video, the dashboard administrator can disable autoplay in advance via an iframe or plugin option. Of course, the dashboard administrator has the authority to set the URL to load, so there should be no unintended URLs being called. Therefore, I believe the benefits of setting this flag outweigh any concerns.

Thank you in advance for your consideration of the above.

@CLAassistant
Copy link

CLAassistant commented Feb 27, 2023

CLA assistant check
All committers have signed the CLA.

@briangann
Copy link
Collaborator

sounds great, i will test this out asap!

@briangann briangann self-requested a review March 3, 2023 04:57
@briangann briangann added the enhancement New feature or request label Mar 3, 2023
@briangann briangann self-assigned this Mar 3, 2023
@briangann briangann added the no stalebot exempt from stale bot label Mar 7, 2023
Copy link
Collaborator

@briangann briangann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks!

@briangann briangann merged commit d91823c into grafana:main Mar 25, 2023
@legnoh legnoh deleted the add-autoplay-policy-option branch March 25, 2023 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request no stalebot exempt from stale bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants