Skip to content

Commit

Permalink
🐛 Get properties directly in content component
Browse files Browse the repository at this point in the history
If the content prototype generator is active, it was possible that the defaults get not fetched correctly
  • Loading branch information
jonnitto committed May 26, 2020
1 parent 34f848d commit bc28edf
Showing 1 changed file with 77 additions and 22 deletions.
99 changes: 77 additions & 22 deletions Resources/Private/Fusion/Content/Video.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -12,58 +12,113 @@ prototype(Jonnitto.PrettyEmbedVideoPlatforms:Content.Video) < prototype(Jonnitto
ratio = ${q(node).property('metadataRatio')}
async = true

loadImageStrategy = ${Configuration.setting('Jonnitto.PrettyEmbedVideoPlatforms.loadImageStrategy')}
enableGdprMessage = ${Configuration.setting('Jonnitto.PrettyEmbedHelper.enableGdprMessage')}
gdprMessage = Jonnitto.PrettyEmbedHelper:GdprMessage

# Should the video be opened on a lightbox?
lightbox = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'lightbox'
}

# When the lightbox is set, should the preview image preserve his aspect ratio?
preserveAspectRatio = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'preserveAspectRatio'
}

# If no aspect ratio can be calcualted from the oembed service, you have the possibility to force the aspect ratio 16:9
force16to9 = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'force16to9'
}

loadImageStrategy = ${Configuration.setting('Jonnitto.PrettyEmbedVideoPlatforms.loadImageStrategy')}
enableGdprMessage = ${Configuration.setting('Jonnitto.PrettyEmbedHelper.enableGdprMessage')}
gdprMessage = Jonnitto.PrettyEmbedHelper:GdprMessage
# Whether to restart the video automatically after reaching the end.
loop = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'loop'
}

# Whether the video plays inline on supported mobile devices.
# Note that if set to false it does not imply that the video will always be played in fullscreen.
playsinline = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'playsinline'
}

# Allow full screen
allowFullScreen = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'allowFullScreen'
}

#################################
# Additional settings for Youtube
#################################

# This parameter indicates whether the video player controls are displayed
controls = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'controls'
}

# Setting the parameter's value to true causes closed captions to be shown by default,
# even if the user has turned captions off.
closedCaptions = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'closedCaptions'
}

# It is not possible to disable related videos, but if it is set to false, the player will
# show related videos that are from the same channel as the video that was just played.
showRelated = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'showRelated'
}

// Vimeo specific
###############################
# Additional settings for Vimeo
###############################

# Whether to pause the current video when another Vimeo video on the same page starts to play.
# Set this value to false to permit simultaneous playback of all the videos on the page.
autopause = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'autopause'
}
color = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'color'
}

# Whether the player is in background mode, which hides the playback controls, enables autoplay, and loops the video.
background = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'background'
}

# Whether the video is muted upon loading. The true value is required for the autoplay behavior in some browsers.
muted = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'muted'
}

# Whether the responsive player and transparent background are enabled
transparent = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'transparent'
}

# The hexadecimal color value of the playback controls, which is normally 00ADEF.
color = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'color'
}

# Whether the player displays the title overlay
previewTitle = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'previewTitle'
}

# Whether to display the video owner's name.
previewByline = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'previewByline'
}

# Whether to display the video owner's portrait.
previewPortrait = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'previewPortrait'
}

// Youtube specific
closedCaptions = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'closedCaptions'
}
showRelated = Jonnitto.PrettyEmbedHelper:GetProperty {
property = 'showRelated'
}


/*
These properties are already defined in Jonnitto.PrettyEmbedHelper:Content
- maximumWidth
- wrapper
- origin
- image
- lightbox
- preserveAspectRatio
- playsinline
- loop
- controls
- muted
*/

// Internal
Expand Down

0 comments on commit bc28edf

Please sign in to comment.