-
-
Notifications
You must be signed in to change notification settings - Fork 6
04. Settings for the YouTube player
If you enable any mixin, (like Jonnitto.PrettyEmbedHelper:Mixin.Controls
) the settings will take no effect and the editor can choose it by himself. Of course, you can also add properties if you are missing a setting option. The property just needs to have the same name as the key in Settings.Jonnitto.yaml
. It will then be activated automatically. No Fusion needs to be adapted for this.
You can alter the behavior on how the player should handle GDPR
If you set it to false
no message will get shown, and the player starts the video immediately, if you set it to popup
, the player open a popup with the link to the embedded player. The link will open with the rel="noopener external"
attribute. Also will to popup set to the center of the window. So it is a kind of fake lightbox. If you set it true
(default value), a message will be shown. If the user accept it, the player will start. But he will also get the chance to open the video in a new window. This link has the same behavior as the popup.
Jonnitto:
PrettyEmbed:
YouTube:
gdprHandling: true
If you want to save the duration of YouTube videos and playlists into the property `prettyembedMetadata`` you have to add a API key from YouTube Data API v3. You can create this key on the Google Cloud Console. This key is only used in the backend
Whether to display the player's interactive elements, including the play bar and sharing buttons. Set this option to false for a chromeless experience.
This is how the player look like without controls:
On mouseover, a pause button will be shown
Jonnitto:
PrettyEmbed:
YouTube:
controls: false
You can also enable the mixin Jonnitto.PrettyEmbedHelper:Mixin.Controls
to let the editor choose.
Whether to restart the video automatically after reaching the end.
Jonnitto:
PrettyEmbed:
YouTube:
loop: false
You can also enable the mixin Jonnitto.PrettyEmbedHelper:Mixin.Loop
to let the editor choose.
Should the video be opened on a lightbox? Per default this is set via the node properties and the mixin Jonnitto.PrettyEmbedHelper:Mixin.Lightbox
Jonnitto:
PrettyEmbed:
YouTube:
lightbox: false
Sets if the image should preserve his aspect ratio when the lightbox is set. Per default this is set via the node properties and the mixin Jonnitto.PrettyEmbedHelper:Mixin.PreserveAspectRatio
Jonnitto:
PrettyEmbed:
YouTube:
preserveAspectRatio: true
If no aspect ratio can be calcualted from the oembed service, you have the possibility to set a fallback aspect ratio.
Jonnitto:
PrettyEmbed:
YouTube:
fallbackAspectRatio: '16 / 9'
I would be very happy if you want me to help me to improve this documentation. If you have troubles to get it running, drop me a line by starting a discussion and I'll try to help you out.