Html5 video poster preview image
I have created a patch for media content to enable Video preview image "poster" in media in the old fashion way.
So if there is an jpg image in the same folder with the same name as the video file it will be shown with the html5 poster attribute.
[FEATURE] HTML5 video poster preview image
Enable Video preview image "poster" in media in the old fashion way.
If there is a jpg, jpeg or png image in the same folder with the same
name as the video file it will be added with the HTML5 poster attribute.
The file extensions are checked exactly in the order mentioned above.
Tested-by: Mathias Brodala <email@example.com>
Reviewed-by: Georg Ringer <firstname.lastname@example.org>
Tested-by: Georg Ringer <email@example.com>
Reviewed-by: Benni Mack <firstname.lastname@example.org>
Tested-by: Benni Mack <email@example.com>
#7 Updated by Werner Trunk over 5 years ago
Sorry, it turned out due to internals of media elements it needs to be:
$poster = preg_replace('/.[^.]*$/', '.jpg', reset($conf['sources']));
cause after change videos the index does not start at 1 any more.
Also if there are more then 1 video source with different names the name of the jpg poster file has to match the first video.