prototype(Jonnitto.PrettyEmbedYoutube:Content.Youtube) < prototype(Jonnitto.PrettyEmbedHelper:Content) { package = 'Youtube' metadataID = ${q(node).property('metadataID')} videoID = ${q(node).property('videoID')} videoID.@process.getIDFromUrl = ${this.metadataID ? this.metadataID : Jonnitto.PrettyEmbedHelper.youtubeID(value)} alternativeText = ${q(node).property('metadataTitle')} imageFromYoutube = ${q(node).property('metadataImage')} thumbnailFromResources = ${q(node).property('metadataThumbnail')} ratio = ${q(node).property('metadataRatio')} maximumWidth = ${Configuration.setting('Jonnitto.PrettyEmbedHelper.maximumWidth')} async = true # This can be 'video' or 'playlist'. type = Jonnitto.PrettyEmbedHelper:GetProperty { property = 'type' } # 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' } # 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' } # 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' } enableGdprMessage = ${Configuration.setting('Jonnitto.PrettyEmbedHelper.enableGdprMessage')} gdprMessage = Jonnitto.PrettyEmbedHelper:GdprMessage gdprMessageAccept = Jonnitto.PrettyEmbedHelper:GdprMessageAccept gdprMessageNewWindow = Jonnitto.PrettyEmbedHelper:GdprMessageNewWindow renderer = Neos.Fusion:Component { @apply.props = ${props} poster = Neos.Fusion:Case { hasPersisantResource { condition = ${props.image || props.thumbnailFromResources} renderer = Neos.Neos:ImageUri { asset = ${props.image || props.thumbnailFromResources} async = ${props.async} maximumWidth = ${props.maximumWidth} } } thumbnailFromYoutube { condition = ${props.videoID} renderer = ${props.imageFromYoutube} } } poster2x = Neos.Neos:ImageUri { @if { hasAsset = ${this.asset} hasEnoughPixel = ${this.asset.width >= props.maximumWidth * 2} } asset = ${props.image || props.thumbnailFromResources} async = ${props.async} maximumWidth = ${props.maximumWidth * 2} } renderer = Neos.Fusion:Case { noVideoID { condition = ${!props.videoID} renderer = Jonnitto.PrettyEmbedHelper:Notification { key = 'noVideoID' default = 'Please add a Youtube ID or url in the inspector' } } noPoster { condition = ${!props.poster && props.type == 'playlist'} renderer = Jonnitto.PrettyEmbedHelper:Notification { key = 'needPreviewImage' default = 'You need to define a custom preview image.' } } default { condition = true renderer = afx`` } } } }