2017 © Pedro Pelรกez
 

neos-plugin prettyembedyoutube

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

image

jonnitto/prettyembedyoutube

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  • Friday, May 18, 2018
  • by jonnitto
  • Repository
  • 2 Watchers
  • 6 Stars
  • 4,483 Installations
  • CSS
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 37 Versions
  • 11 % Grown

The README.md

![Latest stable version] ![Total downloads] ![License] ![GitHub forks] ![Donate Paypal] [!Wishlist amazon][amazon] ![GitHub stars] ![GitHub watchers] ![GitHub followers] ![Follow Jon on Twitter], (*1)

Jonnitto.PrettyEmbedYoutube

There is a successor of this package: PrettyEmbedVideoPlatforms It includes automatic detection of Vimeo or YouTube videos. To update, follow these instructions., (*2)

Prettier embeds for your YouTube videos and playlists in Neos CMS - with helpful options like high-res preview images, lightbox feature, and advanced customization of embed options., (*3)

!Screenshot, (*4)

Version Neos Maintained
2.* 2.*
> 4.1.* 3.* + 4.*
5.* 3.3.* + 4.*
6.* ^4.2.* + 5.*
7.* ^4.2.* + >= 5 โœ“
8.* >= 5.3 โœ“

Installation

Most of the time, you have to make small adjustments to a package (e.g., configuration in Settings.yaml). Because of that, it is essential to add the corresponding package to the composer from your theme package. Mostly this is the site package located under Packages/Sites/. To install it correctly go to your theme package (e.g.Packages/Sites/Foo.Bar) and run following command:, (*5)

composer require jonnitto/prettyembedyoutube --no-update

The --no-update command prevent the automatic update of the dependencies. After the package was added to your theme composer.json, go back to the root of the Neos installation and run composer update. Et voilร ! Your desired package is now installed correctly., (*6)

FAQ

What are the differences from the PrettyEmbed series to Jonnitto.Plyr?, (*7)

PrettyEmbed series Plyr
YouTube Video โœ“ โœ“
YouTube Playlist โœ“
Vimeo โœ“ โœ“
Native Audio โœ“ โœ“
Native Video โœ“ โœ“
Advanced captions for native video โœ“
Preview image โœ“
Lightbox included โœ“
Preview image (for videos) โœ“
Javascript API โœ“
Filesize (JS & CSS) smaller bigger

All packages from the PrettyEmbed series have the benefit of a better frontend performance since the player gets only loaded on request. So, no iframe/video gets loaded until the user wants to watch a video., (*8)

Customization

Settings.Jonnitto.yaml

JS API / Usage of youtube-nocookie.com

If you want to use the JavaScript API from youtube (e.g., for tracking), you have to enable set enableJsApi to true., (*9)

Jonnitto:
  PrettyEmbedYoutube:
    enableJsApi: true

or, if you want to use the youtube-nocookie.com domain you can also edit the entries in your Settings.yaml file like this:, (*10)

Jonnitto:
  PrettyEmbedYoutube:
    url:
      playlist:
        embed: 'https://www.youtube-nocookie.com/embed/videoseries?list=%id%'
        href: 'https://www.youtube-nocookie.com/playlist?list=%id%'
      video:
        embed: 'https://www.youtube-nocookie.com/embed/%id%'
        href: 'https://www.youtube-nocookie.com/watch?v=%id%'

Be aware that you need to provide the placeholder for the ID (%id%) of the playlist or video., (*11)

Global settings for the whole PrettyEmbed series

Some settings will be set globally from the PrettyEmbedHelper package. These are the default settings:, (*12)

Jonnitto:
  PrettyEmbedHelper:
    # If you want to use your own assets, set this to false (Backend.js and Backend.css will be always be included in the backend)
    includeAssets:
      css: true
      js: true

    # If you want to save the duration of YouTube videos and playlists into the
    # property metadataDuration you have to add a API key from YouTube Data API v3
    # You can create this key on https://console.cloud.google.com/
    youtubeApiKey: null

    # For Vimeo and Youtube you can enable here the option the show a confirm dialog
    # that external content get loaded and the user may be tracked
    enableGdprMessage: false

    # This is the maximum width of a custom preview image
    maximumWidth: 1920

    # If this is set to a string, the element gets wrapped with a div and the class with the giving string.
    # If set to true, the element gets wrapped with a div without any class.
    # If set to false, the element get not wrapped at all
    wrapper: 'jonnitto-prettyembed-wrapper'

    # The buttons which get injected (file content) to the player.
    button:
      play: 'resource://Jonnitto.PrettyEmbedHelper/Public/Assets/PlayButton.svg'
      pause: 'resource://Jonnitto.PrettyEmbedHelper/Public/Assets/PauseButton.svg'

Disable inclusion of the CSS and/or JS files

The Javascript and CSS files get loaded via Sitegeist.Slipstream:, (*13)

If you want to load your own CSS, you can disable it like that:, (*14)

Jonnitto:
  PrettyEmbedHelper:
    includeAssets:
      css: false

If you want to load your own Javascript, you can disable it like that:, (*15)

Jonnitto:
  PrettyEmbedHelper:
    includeAssets:
      js: false

If you use SCCS in your build pipeline, you can adjust the look and feel of [Main.scss] with following variables:, (*16)

// Buttons (play / pause)
$prettyembed-button-play-size: 72px !default;
$prettyembed-button-pause-size: round(
  $prettyembed-button-play-size / 2
) !default;
$prettyembed-button-pause-margin: round(
  $prettyembed-button-pause-size / 2
) !default;
$prettyembed-button-opacity: 0.9 !default;
$prettyembed-button-scale: 0.8 !default;
$prettyembed-button-scale-hover: 1 !default;
$prettyembed-button-scale-active: 0.9 !default;
$prettyembed-button-foreground-color: #fff !default;
$prettyembed-button-background-color: #000 !default;
$prettyembed-button-background-opactiy: 0.4 !default;

// Lightbox
$prettyembed-lightbox-include: true !default;
$prettyembed-lightbox-overlay-color: #0b0b0b !default;
$prettyembed-lightbox-overlay-opacity: 0.8 !default;
$prettyembed-lightbox-padding: 15px !default;
$prettyembed-lightbox-max-width: 900px !default;
$prettyembed-lightbox-shadow: 0 0 8px rgba(#000, 0.6) !default;
$prettyembed-lightbox-z-index: 5500 !default;
$prettyembed-lightbox-close-size: 30px !default;
$prettyembed-lightbox-close-opacity: 0.65 !default;
$prettyembed-lightbox-close-opacity-hover: 1 !default;
$prettyembed-lightbox-close-color: #fff !default;

Because all variables have the !default flag, the variables don't get overwritten if you declare them before you import [Main.scss]. Like that, most of the frequent adjustments can be easily achieved., (*17)

NodeTypes and Mixins

If you want to customize the default settings, take a look at the Settings.Jonnitto.yaml file. If no node property is given, these default values will be taken. If you, for example, don't want to let the editor choose if the video is a playlist or just a video you can deactivate the mixin in your Configuration folder like this:, (*18)

'Jonnitto.PrettyEmbedYoutube:Content.Youtube':
  superTypes:
    'Jonnitto.PrettyEmbedYoutube:Mixin.Type': false

These are the available mixins:, (*19)

Mixin name (Prefix: Jonnitto.PrettyEmbed) Description Default value Enabled per default
Helper:Mixin.Groups Enables the inspector groups โœ“
Helper:Mixin.Image Add the preview image property โœ“
Helper:Mixin.Lightbox Open the video in a lightbox false โœ“
Helper:Mixin.PreserveAspectRatio If the lightbox is active, the preview image can preserve his aspect ratio. true โœ“
Helper:Mixin.BackendLabel Read the title of the video and set this as label in the content tree โœ“
Youtube:Mixin.Type Choose between playlist and video video โœ“
Youtube:Mixin.VideoID Let the user enter the video id or youtube url โœ“
Helper:Mixin.AllowFullScreen Allow fullscreen or not true
Helper:Mixin.Loop Loop the video false
Helper:Mixin.Controls Show the controls true
Youtube:Mixin.ClosedCaptions Show captions false
Youtube:Mixin.ShowRelated Show related videos at the end false

If you want to include the youtube video in your node type, you should use at least the mixin Jonnitto.PrettyEmbedYoutube:Mixin.VideoID. This add besides the videoID property also the properties for the metadata fetched from the oembed service. This mixin is also necessary to fetch/update the data from the service., (*20)

Fusion

If you want to use the player as a pure component, you can use the [Jonnitto.PrettyEmbedYoutube:Component.Youtube] fusion prototype., (*21)

If you want to read the node properties and let the package handle all for you, you should use the [Jonnitto.PrettyEmbedYoutube:Content.Youtube] prototype. For more comfortable including in your 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 a video node type., (*22)

Get metadata

To get the metadata, you can run the flow command ./flow prettyembed:metadata. This command search for nodes with the VideoID mixin, and tries to get the metadata. If for some reason, it is not possible to fetch the metadata (Perhaps the video is set to private, or the ID does not exist), you will get a table with the name of the node type, the type, the video ID and the node path.
The task comes with two options:, (*23)

  • --workspace Workspace name, default is 'live'
  • --remove Is set, all metadata will be removed

To get an overview of the options in the cli, you can run ./flow help prettyembed:metadata, (*24)

Update from older versions

To update from version 5 or older, you have to run following command in your cli:
./flow node:migrate --version 20190619204500, (*25)

To check the current state of the migrations, you can run
./flow node:migrationstatus, (*26)

If you want to update from version 4 or older, you have to run following command:
./flow node:migrate --version 20181029203246, (*27)

After all those migrations you have to flush your frontend cache:
./flow cache:flushone --identifier Neos_Fusion_Content, (*28)

The Versions

18/05 2018

dev-master

9999999-dev https://github.com/jonnitto/Jonnitto.PrettyEmbedYoutube

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

27/04 2018

4.1.0

4.1.0.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

21/10 2017

4.0.1

4.0.1.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

18/10 2017

4.0.0

4.0.0.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

09/08 2017

3.0.4

3.0.4.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

09/08 2017

2.1.x-dev

2.1.9999999.9999999-dev

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

09/08 2017

2.1.12

2.1.12.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

22/05 2017

3.0.3

3.0.3.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

12/04 2017

2.1.11

2.1.11.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

29/03 2017

3.0.2

3.0.2.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

29/03 2017

v3.0.2

3.0.2.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

27/02 2017

v3.0.1

3.0.1.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

27/02 2017

3.0.1

3.0.1.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

30/01 2017

v3.0.0

3.0.0.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

27/10 2016

2.1.9

2.1.9.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

24/10 2016

2.1.8

2.1.8.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

24/10 2016

2.1.7

2.1.7.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

video flow neos youtube contentelement

23/04 2016

2.1.6

2.1.6.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

14/04 2016

2.1.5

2.1.5.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

21/03 2016

2.1.4

2.1.4.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

19/02 2016

2.1.3

2.1.3.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

17/02 2016

2.1.2

2.1.2.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

29/01 2016

2.1.1

2.1.1.0

Prettier embeds for your YouTube videos and playlists in Neos CMS - with nice options like high-res preview images and advanced customization of embed options. Embed and lightbox functions use Gator for event delegation.

  Sources   Download

MIT

The Requires

 

25/12 2015

2.1.0

2.1.0.0

Prettier embeds for your YouTube Video and playlists in Neos - with nice options like high-res preview images and advanced customization of embed options. Embed function with pure Vanilla JS.

  Sources   Download

MIT

The Requires

 

19/12 2015

2.0.6

2.0.6.0

Prettier embeds for your YouTube Video and playlists in Neos - with nice options like high-res preview images and advanced customization of embed options. Embed function with pure Vanilla JS.

  Sources   Download

MIT

The Requires

 

17/12 2015

2.0.5

2.0.5.0

Prettier embeds for your YouTube Video and playlists in Neos - with nice options like high-res preview images and advanced customization of embed options. Embed function with pure Vanilla JS.

  Sources   Download

MIT

The Requires

 

17/12 2015

2.0.4

2.0.4.0

Prettier embeds for your YouTube Video and playlists in Neos - with nice options like high-res preview images and advanced customization of embed options. Embed function with pure Vanilla JS.

  Sources   Download

MIT

The Requires

 

14/12 2015

2.0.2

2.0.2.0

Prettier embeds for your YouTube Video and playlists in Neos - with nice options like high-res preview images and advanced customization of embed options. Embed function with pure Vanilla JS.

  Sources   Download

MIT

The Requires

 

17/11 2015

2.0.1

2.0.1.0

Prettier embeds for your YouTube Video and playlists in Neos - with nice options like high-res preview images and advanced customization of embed options. Embed function with pure Vanilla JS.

  Sources   Download

MIT

The Requires

 

27/10 2015

0.5.0

0.5.0.0

Prettier embeds for your YouTube Video and playlists in Neos - with nice options like high-res preview images and advanced customization of embed options. Embed function with pure Vanilla JS.

  Sources   Download

MIT

The Requires

 

27/10 2015

0.4.0

0.4.0.0

Prettier embeds for your YouTube Video and playlists in Neos - with nice options like high-res preview images and advanced customization of embed options. Embed function with pure Vanilla JS.

  Sources   Download

MIT

The Requires

 

06/07 2015

0.3.0

0.3.0.0

Prettier embeds for your YouTube Video and playlists in TYPO3 Neos - with nice options like high-res preview images and advanced customization of embed options. Embed function with pure Vanilla JS.

  Sources   Download

MIT

The Requires

 

29/05 2015

0.2.4

0.2.4.0

Prettier embeds for your YouTubes in TYPO3 Neos - with nice options like high-res preview images and advanced customization of embed options. Embed function with pure Vanilla JS.

  Sources   Download

MIT

The Requires

 

29/05 2015

0.2.3

0.2.3.0

Prettier embeds for your YouTubes in TYPO3 Neos - with nice options like high-res preview images and advanced customization of embed options. Embed function with pure Vanilla JS.

  Sources   Download

MIT

The Requires

 

29/05 2015

0.2.1

0.2.1.0

Prettier embeds for your YouTubes in TYPO3 Neos - with nice options like high-res preview images, advanced customization of embed options and FitVids support. Now with lightbox support.

  Sources   Download

MIT

The Requires

 

07/05 2015

0.1.2

0.1.2.0

Prettier embeds for your YouTubes in TYPO3 Neos - with nice options like high-res preview images, advanced customization of embed options and FitVids support.

  Sources   Download

MIT

The Requires

 

28/04 2015

0.1.1

0.1.1.0

Prettier embeds for your YouTubes in TYPO3 Neos - with nice options like high-res preview images, advanced customization of embed options and FitVids support.

  Sources   Download

MIT

The Requires