jaxwilko / wn-mediastream-plugin
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 2
Open Issues: 0
Type:winter-plugin
Requires
- php-ffmpeg/php-ffmpeg: ^0.19.0
This package is auto-updated.
Last update: 2024-12-10 22:13:44 UTC
README
Intro
This plugin adds streaming support for html5 videos.
Installation
composer install jaxwilko/wn-mediastream-plugin
Usage
Once installed, you can use the video
component to add a video to your page:
title = "Example" url = "/example" is_hidden = 0 [video] == {% styles %} <div> {% component 'video' file='media/videos/example.mp4' %} </div>
If you're not using the
{% styles %}
tag, you'll need to include/plugins/jaxwilko/mediastream/assets/css/video.css
yourself.
The video component supports the following properties:
Lazy loading support is compatible with verlok/vanilla-lazyload.
The file
property is the path to your video within the media storage.
E.g. file='videos/example.mp4'
will load storage/app/media/videos/example.mp4
when using local storage.
Metadata
Video metadata can be added via the backend, this is used to support the VideoObject
schema.
Thumbnails
By default, if the file is in local storage a thumbnail will be generated using ffmpeg. If the file is remote, then ffmpeg will not be able to generate the thumbnail and you will have to supply your own. This can also be done via the MediaStream Meta tab in the backend.
The meta thumbnail will also be used instead of the generated one if present.