-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
62 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
prototype(Jonnitto.PrettyEmbed:Assets) < prototype(Neos.Fusion:Component) { | ||
@propTypes { | ||
player = ${PropTypes.oneOf(['YouTube', 'Vimeo', 'Video', 'Audio']).isRequired} | ||
gdprHandling = ${PropTypes.oneOf([true, false, 'popup'])} | ||
includeAlpineJsCheck = ${PropTypes.boolean} | ||
inBackend = ${PropTypes.boolean} | ||
} | ||
|
||
debug = ${Configuration.setting('Jonnitto.PrettyEmbed.debug')} | ||
includeAssets = ${Configuration.setting('Jonnitto.PrettyEmbed.includeAssets')} | ||
includeAlpineJsCheck = ${Configuration.setting('Jonnitto.PrettyEmbed.includeAlpineJsCheck')} | ||
inBackend = ${node.context.inBackend && node.context.currentRenderingMode.edit} | ||
|
||
// This decides which file to load | ||
player = null | ||
|
||
renderer = Carbon.FileLoader:Component { | ||
package = 'Jonnitto.PrettyEmbedHelper' | ||
css = ${props.includeAssets.css ? 'Main.css' : null} | ||
js = ${[props.inBackend ? 'Backend.js' : null, props.debug ? 'Debug.js' : null]} | ||
mjs = Neos.Fusion:DataStructure { | ||
gdprPlugin = ${props.gdprHandling == true ? 'Consent.js' : null} | ||
magicPlugin = ${props.player == 'Video' || props.player == 'Audio' || props.gdprHandling != 'Popup' ? 'Methods.js' : null} | ||
popupPlugin = ${props.gdprHandling ? 'Popup.js' : null} | ||
pluginBasedOnPlayer = ${props.player == 'Video' || props.player == 'Audio' ? 'Media.js' : (props.player + '.js')} | ||
alpineJsCheck= ${props.includeAlpineJsCheck ? 'AlpineCheck.js' : null} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
Resources/Private/Fusion/Helper/Assets/Fragment/Module.fusion
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
Resources/Private/Fusion/Helper/Assets/Fragment/Script.fusion
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
Resources/Private/Fusion/Helper/Assets/Fragment/Style.fusion
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,14 @@ prototype(Jonnitto.PrettyEmbed:Presentation.Audio) < prototype(Neos.Fusion:Compo | |
|
||
@if.checkAudio = ${this.content} | ||
|
||
// @internal Move to @private if minimal Neos requirement is 8.3 or higher | ||
_fileLoader = ${{debug: this.debug}} | ||
[email protected] = Jonnitto.PrettyEmbed:Assets { | ||
player = 'Audio' | ||
debug = ${value.debug} | ||
} | ||
_fileLoaderAsAttributes = ${!Type.isString(this._fileLoader)} | ||
|
||
renderer = afx` | ||
<Jonnitto.PrettyEmbed:Presenation.Wrapper wrapper={props.wrapper}> | ||
<div | ||
|
@@ -31,8 +39,9 @@ prototype(Jonnitto.PrettyEmbed:Presentation.Audio) < prototype(Neos.Fusion:Compo | |
aria-label={props.label} | ||
id={props.id} | ||
class={Carbon.String.merge(props.class, BEM.modifier('jonnitto-prettyembed', 'audio'))} | ||
{...(props._fileLoaderAsAttributes ? props._fileLoader : {})} | ||
> | ||
<Jonnitto.PrettyEmbed:Assets player="Audio" debug={props.debug} /> | ||
{props._fileLoaderAsAttributes ? '' : props._fileLoader} | ||
{props.customControls} | ||
<audio | ||
x-prettyembedmedia:media | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,16 @@ prototype(Jonnitto.PrettyEmbed:Presentation.Iframe) < prototype(Neos.Fusion:Comp | |
checkYouTube = ${this.player == 'YouTube' ? (this.videoID && this.href && this.embedHref) : true} | ||
checkPreviewImage = ${this.poster || this.preview} | ||
} | ||
|
||
// @internal Move to @private if minimal Neos requirement is 8.3 or higher | ||
_alwaysOpenInPopup = ${this.gdprHandling == 'popup'} | ||
_fileLoader = ${{debug: this.debug, player: this.player, gdprHandling: this.gdprHandling}} | ||
[email protected] = Jonnitto.PrettyEmbed:Assets { | ||
player = ${value.player} | ||
gdprHandling = ${value.gdprHandling} | ||
debug = ${value.debug} | ||
} | ||
_fileLoaderAsAttributes = ${!Type.isString(this._fileLoader)} | ||
|
||
renderer = afx` | ||
<Jonnitto.PrettyEmbed:Presenation.Wrapper wrapper={props.wrapper}> | ||
|
@@ -78,12 +87,9 @@ prototype(Jonnitto.PrettyEmbed:Presentation.Iframe) < prototype(Neos.Fusion:Comp | |
id={props.id} | ||
class={Carbon.String.merge(props.class, BEM.modifier('jonnitto-prettyembed', String.toLowerCase(props.player)), props.setAspectRatioClass && 'jonnitto-prettyembed-ratio')} | ||
style={props.aspectRatio ? '--aspect-ratio:' + props.aspectRatio : null} | ||
{...(props._fileLoaderAsAttributes ? props._fileLoader : {})} | ||
> | ||
<Jonnitto.PrettyEmbed:Assets | ||
player={props.player} | ||
gdprHandling={props.gdprHandling} | ||
debug={props.debug} | ||
/> | ||
{props._fileLoaderAsAttributes ? '' : props._fileLoader} | ||
<Jonnitto.PrettyEmbed:Presentation.Button.Play | ||
@if={!props._alwaysOpenInPopup} | ||
show={props.controls ? "!loaded" : "!playing"} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters