-
-
Notifications
You must be signed in to change notification settings - Fork 6
07 Mixins
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:
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 |
✓ |
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 | ✓ |
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 | ✓ |
The mixin is prefixed with Jonnitto.PrettyEmbedVideoPlatforms:Mixin
Mixin name | Description | Default | Enabled |
---|---|---|---|
VideoID |
Let the user enter the video ID or the URL | ✓ |
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.