Skip to content

09 Usage in own content element

Jon Uhlmann edited this page Dec 12, 2023 · 2 revisions

If you want to use the player as a pure component, you can use the Fusion prototype placed in the PrettyEmbedHelper package.

But, if you want to read the node properties and let the package handle all for you, you should use the content prototype set in the corresponding package. For easier including in your own node types, you can disable the content element wrapping with contentElement = false. This is useful if you want to create for example a text with audio/video/Vimeo/YouTube node type.

Example:

prototype(Foo.Bar:TextWithVideoPlatform) < prototype(Neos.Neos:ContentComponent) {
    
    text = Neos.Neos:Editable {
        property = 'text'
    }

    renderer = afx`
        <div>
            {props.text}
            <Jonnitto.PrettyEmbedVideoPlatforms:Content.Video contentElement={false} />
        </div>        
    `
}