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 <firstname.lastname@example.org>
Reviewed-by: Georg Ringer <email@example.com>
Tested-by: Georg Ringer <firstname.lastname@example.org>
Reviewed-by: Benni Mack <email@example.com>
Tested-by: Benni Mack <firstname.lastname@example.org>
#7 Updated by Werner Trunk over 4 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.