Skip to content

07 Mixins

Jon Uhlmann edited this page Dec 12, 2023 · 2 revisions

If you want to customize the default settings, take a look at the Settings.Jonnitto.yaml file. If no node property is given, these default values will be taken. If you, for example, want to let the editor choose if the video is has the controls from the platform, you can activate the mixin in your file where you override node types like that:

"Jonnitto.PrettyEmbedVideoPlatforms:Content.Video":
  superTypes:
    "Jonnitto.PrettyEmbedHelper:Mixin.Controls": true

These are the available mixins:

PrettyEmbedHelper mixins

The mixins are prefixed with Jonnitto.PrettyEmbedHelper:Mixin

Mixin name Description Default Enabled Video Audio YouTube / Vimeo Streaming
Autoplay Enables autoplay false
BackendLabel Read the title of the video and set this as label in the content tree
Controls Show the controls true
Groups Enables the inspector groups
Image Add the preview image property
Lightbox Open the video in a lightbox property false
Loop Loop the video false
Metadata Safe the metadata, e.g. duration and all the data from the oembed service.
Muted Mutes the player false
PreserveAspectRatio If the lightbox is active, the preview image can preserve his aspect ratio. true
Title Pass the title as aria-label to the component. true

PrettyEmbedAudio mixins

The mixins are prefixed with Jonnitto.PrettyEmbedAudio:Mixin

Mixin name Description Default Enabled
Assets Set assets (internal) for the audio player
ExternalSources Set external sources for the audio player
Sources Combine internal and external sources for the audio player

PrettyEmbedVideo mixins

The mixins are prefixed with Jonnitto.PrettyEmbedVideo:Mixin

Mixin name Description Default Enabled
Assets Set assets (internal) for the video player
ExternalSources Set external sources for the video player
Sources Combine internal and external sources for the video player
Tracks Enable setting of subtitles and captions

PrettyEmbedVideoPlatforms mixin

The mixin is prefixed with Jonnitto.PrettyEmbedVideoPlatforms:Mixin

Mixin name Description Default Enabled
VideoID Let the user enter the video ID or the URL