Giter VIP home page Giter VIP logo

jonnitto.prettyembedvideoplatforms's Introduction

Latest stable version Total downloads License GitHub forks Donate Paypal Wishlist amazon GitHub stars GitHub watchers GitHub followers Follow Jon on Twitter

Jonnitto.PrettyEmbedVideoPlatforms

For a detail guide, please visit the PrettyEmbed Wiki

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

Screenshot

Version Neos Maintained
1.* 4.2.*, > 5
2.* >= 5.3
3.* >= 5.3
6.* >= 7.3

The version jump was made to have all packages from the PrettyEmbed series on the same number

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. Navigate to this package in your CLI and run the following command:

composer require jonnitto/prettyembedvideoplatforms --no-update

The --no-update command prevent the automatic update of the dependencies. After the package was added to your package 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.

Merge PrettyEmbedYoutube and PrettyEmbedVimeo

If you want existing nodes from PrettyEmbedYoutube and PrettyEmbedVimeo use this package, you have to run following command in your cli: ./flow node:migrate --version 20200420033756

After this migration you have to flush your frontend cache: ./flow cache:flushone --identifier Neos_Fusion_Content

PrettyEmbedCollection

This package is member of the PrettyEmbedCollection which contains following packages:

If you install the PrettyEmbedCollection, the video players get grouped into an own group in the node-inspector; otherwise, they will be in the default group.

jonnitto.prettyembedvideoplatforms's People

Contributors

chxyz avatar jonnitto avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jonnitto.prettyembedvideoplatforms's Issues

The given class "Jonnitto\PrettyEmbedHelper\Service\ImageService" is not a registered object

Hi @jonnitto, thanks for the package 😉

I was trying to switch my Neos installation to production context and received the following error message. Not sure if it's an error in my Neos installation or from "prettyembedvideoplatforms". Also reinstalling the "prettyembedvideoplatforms" package didn't help. Maybe you can shed some light on this issue?

FLOW_CONTEXT=Production ./flow
Neos 8.3.9 ("Production" context)
usage: ./flow <command identifier>

See "./flow help" for a list of all available commands.

The given class "Jonnitto\PrettyEmbedHelper\Service\ImageService" is not a registered object.

  Type: Neos\Flow\SignalSlot\Exception\InvalidSlotException
  Code: 1245673367
  File: Packages/Framework/Neos.Flow/Classes/SignalSlot/Dispatcher.php
  Line: 171

Open Data/Logs/Exceptions/202401161754425ff35d.txt for a full stack trace.

Here is the exceptions log.

Exception #1245673367 in line 44 of /Users/foo/path/to/Neos/Data/Temporary/Production/Cache/Code/Flow_Object_Classes/Neos_Flow_SignalSlot_SignalAspect.php: The given class "Jonnitto\PrettyEmbedHelper\Service\ImageService" is not a registered object.

17 Neos\Flow\SignalSlot\Dispatcher::dispatch("Neos\Flow\Persistence\Doctrine\PersistenceManager", "allObjectsPersisted", array|0|)
16 Neos\Flow\SignalSlot\SignalAspect_Original::forwardSignalToDispatcher(Neos\Flow\Aop\JoinPoint)
15 Neos\Flow\Aop\Advice\AbstractAdvice::invoke(Neos\Flow\Aop\JoinPoint)
14 Neos\Flow\Persistence\Doctrine\PersistenceManager::emitAllObjectsPersisted()
13 Neos\Flow\Persistence\Doctrine\PersistenceManager_Original::persistAll()
12 Neos\Flow\Package::Neos\Flow\{closure}(Neos\Flow\Cli\Request, Neos\Flow\Cli\Response, Neos\Flow\Command\HelpCommandController, "Neos\Flow\Mvc\Dispatcher::afterControllerInvocation")
11 Closure::__invoke(Neos\Flow\Cli\Request, Neos\Flow\Cli\Response, Neos\Flow\Command\HelpCommandController, "Neos\Flow\Mvc\Dispatcher::afterControllerInvocation")
10 call_user_func_array(array|2|, array|4|)
9 Neos\Flow\SignalSlot\Dispatcher::dispatch("Neos\Flow\Mvc\Dispatcher", "afterControllerInvocation", array|3|)
8 Neos\Flow\Cli\Dispatcher_Original::emitAfterControllerInvocation(Neos\Flow\Cli\Request, Neos\Flow\Cli\Response, Neos\Flow\Command\HelpCommandController)
7 Neos\Flow\Cli\Dispatcher_Original::dispatch(Neos\Flow\Cli\Request, Neos\Flow\Cli\Response)
6 Neos\Flow\Cli\CommandRequestHandler::Neos\Flow\Cli\{closure}()
5 Closure::__invoke()
4 Neos\Flow\Security\Context_Original::withoutAuthorizationChecks(Closure)
3 Neos\Flow\Cli\CommandRequestHandler::handleRequest()
2 Neos\Flow\Core\Bootstrap::run()
1 require("/Users/foo/path/to/Neos/Packages/Framework/Neos.Flow/Scripts/flow.php")

My composer version

composer -V
Composer version 2.6.6 2023-12-08 18:32:26

Composer.json require entry

"jonnitto/prettyembedvideoplatforms": "^3.2"

Autoplay with Firefox on mobile Devices

The autoplay function on mobile devices does not work with Firefox
Firefox blocks all autoplay videos with sound.
To be sure Firefox settings are not the problem I set the settings from Firefox to "Allow Audio and Video"

For reference:
https://codepen.io/nagasai/pen/mdEZabp
a native implementation was working with autoplay on my smartphone with firefox.

I also tested Safari, Chrome and Samsung Browser. No Problem

Information
This bug appears only on smartphones. The error does not appear in compatibility mode.

Smartphone (please complete the following information):

  • Device: Samsung Galaxy Note 20
  • OS: Android 13
  • Browser: Firefox
  • Version 118.2.0

Autoplay for youtube-nocookie.com videos

I am a fan of using youtube-nocookie.com, but currently I am running into an issue, that it is not possible to pass the parameter "&autoplay=1".

So a user needs to click two times to start a video.

Demo url: with some other parameters, which work (except of autoplay): https://www.youtube-nocookie.com/embed/vwq9_rO28us?&autoplay=1&start=41&end=56&fs=0&controls=2&modestbranding=1&playsinline=1&rel=0&showinfo=0

Describe the solution you'd like
If I click the preview Image, the iframe which will be then load, should automatically start.

Describe alternatives you've considered
have an option to switch to the default youtube url, if the video has to load automatically. (maybe the consent element has to be shown then #gdpr, if no consent has given before via cookie)

Division by zero (PrettyEmbedHelper\Eel\Helper::paddingTop($ratio = null))

Hi jonnitto,

thank you for this nice plugin!

Embedding a portrait Youtube video lead to an 500 error.

According to call stack

237 Neos\Eel\CompilingEvaluator_Original::evaluate("Jonnitto.PrettyEmbedHelper.paddingTop(this.ratio || this.force16to9)", Neos\Eel\ProtectedContext)
236 Neos\Eel\Utility_Original::evaluateEelExpression("${Jonnitto.PrettyEmbedHelper.paddingTop(this.ratio || this.force16to9)}", Neos\Eel\CompilingEvaluator, array|37|)

It looks like the bool false gets passed to paddingTop https://github.com/jonnitto/Jonnitto.PrettyEmbedHelper/blob/master/Classes/Eel/Helper.php#L25

And paddingTop doesn't handle this case, casts false to 0 and triggers Division by zero.

Is this a bad configuration or a bug?

Config:

  PrettyEmbedVideoPlatforms:
    defaults:
      lightbox: false
      preserveAspectRatio: false
      force16to9: false

Thank you very much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.