Skip to content

Video autoposter#2000

Open
cweiske wants to merge 2 commits into
getgrav:developfrom
cweiske:video-autoposter
Open

Video autoposter#2000
cweiske wants to merge 2 commits into
getgrav:developfrom
cweiske:video-autoposter

Conversation

@cweiske

@cweiske cweiske commented Apr 27, 2018

Copy link
Copy Markdown

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

cweiske commented Apr 27, 2018

Copy link
Copy Markdown
Author

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

@rhukster

Copy link
Copy Markdown
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

cweiske commented May 1, 2018

Copy link
Copy Markdown
Author

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

cweiske added 2 commits May 14, 2018 21:14
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.

2 participants