add autoplay-policy
option to chromedp flags
#99
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.