Download the PHP package jonnitto/prettyembedyoutube without Composer

On this page you can find all versions of the php package jonnitto/prettyembedyoutube. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package prettyembedyoutube

Latest stable version Total downloads

Jonnitto.PrettyEmbedYoutube

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

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.

Screenshot

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:

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.

FAQ

What are the differences from the PrettyEmbed series to Jonnitto.Plyr?

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.

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.

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

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

Global settings for the whole PrettyEmbed series

Some settings will be set globally from the PrettyEmbedHelper package. These are the default settings:

Disable inclusion of the CSS and/or JS files

The Javascript and CSS files get loaded via Sitegeist.Slipstream:

If you want to load your own CSS, you can disable it like that:

If you want to load your own Javascript, you can disable it like that:

If you use SCCS in your build pipeline, you can adjust the look and feel of Main.scss with following variables:

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.

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:

These are the available mixins:

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.

Fusion

If you want to use the player as a pure component, you can use the Jonnitto.PrettyEmbedYoutube:Component.Youtube fusion prototype.

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.

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:

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

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

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

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

After all those migrations you have to flush your frontend cache:
./flow cache:flushone --identifier Neos_Fusion_Content


All versions of prettyembedyoutube with dependencies

PHP Build Version
Package Version
Requires jonnitto/prettyembedhelper Version ^4.2 || dev-master
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jonnitto/prettyembedyoutube contains the following files

Loading the files please wait ....