Skip to content

Commit

Permalink
Fix: Work around for strange bug in Fusion
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed Sep 4, 2022
1 parent b6d15d5 commit 8249d46
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Resources/Private/Fusion/Component/Attribute.Embed.fusion
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prototype(Jonnitto.PrettyEmbedVideoPlatforms:Component.Attributes.Embed) < prototype(Neos.Fusion:Component) {
configuration = ${Configuration.setting('Jonnitto.PrettyEmbedVideoPlatforms')}
url = ${this.platform == 'youtube' ? this.configuration.youtube[this.type] : this.configuration[this.platform]}
additionalValues = null
additionalValues = ${null}

@of.hasNeededProperties = ${this.platform && this.videoID && Type.isArray(this.url) && Type.isString(this.url.embed)}

Expand Down
22 changes: 11 additions & 11 deletions Resources/Private/Fusion/Component/Video/Video.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ prototype(Jonnitto.PrettyEmbedVideoPlatforms:Component.Video) < prototype(Neos.F
configuration = ${Configuration.setting('Jonnitto.PrettyEmbedVideoPlatforms')}

// This can used as alternative preview
content = null
content = ${null}

live = true
platform = null
videoID = null
platform = ${null}
videoID = ${null}
[email protected] = ${Type.isString(value) ? String.trim(value) : value}

lightbox = ${this.configuration.defaults.lightbox}
Expand All @@ -23,25 +23,25 @@ prototype(Jonnitto.PrettyEmbedVideoPlatforms:Component.Video) < prototype(Neos.F
gdprMessage = Jonnitto.PrettyEmbedHelper:GdprMessage

// Pass a ratio like this: ${16 / 9}
ratio = null
ratio = ${null}

// If true, this get only a value if ratio is not set
force16to9 = ${this.configuration.defaults.force16to9}
[email protected] = ${value ? (16 / 9) : false}

wrapper = ${Configuration.setting('Jonnitto.PrettyEmbedHelper.wrapper')}

id = null
id = ${null}

poster = null
poster2x = null
alternativeText = null
origin = null
poster = ${null}
poster2x = ${null}
alternativeText = ${null}
origin = ${null}

playButton = Jonnitto.PrettyEmbedHelper:Button.Play

// YouTube specific
type = null
type = ${null}
closedCaptions = ${this.configuration.defaults.closedCaptions}
showRelated = ${this.configuration.defaults.showRelated}

Expand Down Expand Up @@ -74,7 +74,7 @@ prototype(Jonnitto.PrettyEmbedVideoPlatforms:Component.Video) < prototype(Neos.F
<Jonnitto.PrettyEmbedHelper:Assets
youtubeAPI={props.enableJsApi && props.platform == 'youtube'}
/>
<Jonnitto.PrettyEmbedVideoPlatforms:Component.Video.Fragment.Youtube
<Jonnitto.PrettyEmbedVideoPlatforms:Component.Video.Fragment.Youtube
@if.set={props.platform == 'youtube'}
{...props}
poster={props.finalPoster}
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Fusion/Content/Video.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ prototype(Jonnitto.PrettyEmbedVideoPlatforms:Content.Video) < prototype(Jonnitto
async = true

// This can used as alternative preview
content = null
content = ${null}

loadImageStrategy = ${Configuration.setting('Jonnitto.PrettyEmbedVideoPlatforms.loadImageStrategy')}
enableGdprMessage = ${Configuration.setting('Jonnitto.PrettyEmbedHelper.enableGdprMessage')}
Expand Down

0 comments on commit 8249d46

Please sign in to comment.