Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video autoposter #2000

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Video autoposter #2000

wants to merge 2 commits into from

Conversation

cweiske
Copy link
Contributor

@cweiske cweiske commented Apr 27, 2018

Automatically detect video thumbnail
The image file will be added as poster attribute to the video tag.

Looks for the following files in the video folder:

  • $filename.jpg
  • $filename.png
  • $filename.$ext.thumb.jpg
  • $filename.$ext.thumb.png

The code is hacky but works for me, and I don't know the Grav API good enough
to do it better.


It's currently based on #1992 but can be used without it.

@cweiske
Copy link
Contributor Author

cweiske commented Apr 27, 2018

The code requires PHP 7.0 because of dirname($path, level) use. Is this a problem?

@rhukster
Copy link
Member

Yes its a problem. Grav currently supports 5.5+

Also this also contains your mimetype PR from a previous PR request, and that needs to me modified to support codecs.

@cweiske
Copy link
Contributor Author

cweiske commented May 1, 2018

I've replaced the PHP7-only code with the GRAV_ROOT constant.

The image file will be added as poster attribute to the video tag.

Looks for the following files in the video folder:
- $filename.jpg
- $filename.png
- $filename.$ext.thumb.jpg
- $filename.$ext.thumb.png

The code is hacky but works for me, and I don't know the Grav API good enough
to do it better.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants