Use JWPlayer as Video-Player in Contao. More to JWPlayer: https://www.jwplayer.com/
This bundle adds a JWPlayer element to Contao. So i can add JWPlayer videos as controllable players or stretched/croped background videos.
Install composer if you haven't already, then enter this command in the main directory of your Contao installation:
composer require mediamotionag/contao-jwplayer-bundle
- Create an account on https://www.jwplayer.com/
- Create a "player" with your preferred design settings and copy the player-id
- Upload a video and copy the video-id
- Save the default video-id in the contao settings
- Add a new element of typ "JWPlayer"
- Save your video-id and optional options
- Optional: for fullscreen videos, define the size by CSS and the "Anzeigemodus" as "Füllen (Proportional & Beschneiden)"
- Anzeigemodus - mode the video is outputed in 1.1 Füllen (Proportional & beschneiden) - to fill a container, without changing proportions, but cropping the video to make it fit 1.2 Füllen (Verzerren & nicht beschneiden) - to fill a container, changing proportions, but not cropping the video 1.3 Proportional (Schwarze Balken) - Video will be fit inside the container, the rest will be filled in black 1.4 1:1 output of video size and proportion
- Autostart - because modern browsers restrict this option, it mostly only works, with muted videos
- Stummschalten - mute video, mostly for autoplay videos (like background videos)
- Wiederholen - loop the video infinite
- Bedienelemente - show controls
- Player-ID überschreiben - if you want to use multiple videp-players (from jwplayer.com), you can overwrite the default player with this option
All API Options: https://developer.jwplayer.com/jw-player/docs/javascript-api-reference/
Bug reports and pull requests are welcome