Grav YouTube Plugin ignores options once placed into Gantry 5 HTML particle

I’ve posted this issue on Gantry git and Grav Youtube plugin’s git about a month ago, but still haven’t received any answer.
So, I will have a try to post it here.

I don’t know to which side this bug relates: Plugin or Gantry, but they are related to each other.

Placing a short code like [youtube color=white autoplay=1][/youtube] into Gantry 5 Custom HTML particle is ignoring some options.

The Short Code processing is turned on (two checkboxes).
So, the youtube frame is loaded but it’s ignoring plugin’s options:
It ignores lazy load , Modest branding
While plugin perfectly works placed in other markdown page.

I’ve tested it on fresh install of Grav 1.7.3, Gantry 5.4.36 and Helium 5.4.36.

Any thoughts or the same behavior?

No one has tried this?

@01K, I’m afraid not that many members use Gantry…

That’s sad :frowning:

The same has bee reproduced on a one-page website without Gantry 5
Just placed a shortcode in a frontmatter editor…


I’m using a regular page in theme Quark. No Gantry.

Added the shortcode you showed [youtube color=white autoplay=1][/youtube] to a regular page: It fails…

Since it looks like regular shortcodes, I installed plugin shortcode-core. And voila it works…

Going to the readme of the plugind it says:

As of version 3.0 you can now use an alternative shortcode syntax that supports passing in the player parameter values inline.

NOTE: shortcode-core plugin is required and must be installed and enabled for Shortcode Syntax to work.

[youtube color=white autoplay=1][/youtube]

Hm, as for example on a localhost I’ve placed this shortcode:
[youtube color=red autoplay=1][/youtube]
As you see controls are still white, autoplay doesn’t work…

@01K, Ouch… didn’t pay attention to the ‘autoplay’ and ‘color’ properties…

Did some Googling:
The reason seems to be because Google and other browsers have disabled autoplay because of the annoying abuse. They now only allow you to use autoplay when you mute the sound. The user will have to enable sound manually.

[youtube color=red autoplay=1 mute=1][/youtube]

According Google docs on embedding video:

color This parameter specifies the color that will be used in the player’s video progress bar to highlight the amount of the video that the viewer has already seen. Valid parameter values are red and white , and, by default, the player uses the color red in the video progress bar. See the YouTube API blog for more information about color options.

White and red for the progress bar is working fine.

That’s strange because lazy-loading still doesn’t work. On other website the autoplay=1 without any additional parameters does work on another - doesn’t…
But it seems that I’ve found a solution: the [plugin:youtube]() code must be used to utilize all params.

But this doesn’t work in Custom HTML particle of Gantry5 It seems that Gantry doesn’t support such plugin call

Regarding Gantry 5. I’ve found this thread

Changed {{ particle.markdown|markdown }} to {{ particle.markdown|raw }}
But it still outputs plain text: [plugin:youtube](