markocupic / bootstrap_responsive_youtube_embed
Embed youtube movies into your responsive layout. Frontend extension for the Contao Open Source CMS
Package info
github.com/markocupic/bootstrap_responsive_youtube_embed
Type:contao-bundle
pkg:composer/markocupic/bootstrap_responsive_youtube_embed
Requires
- php: ^8.1
- contao/core-bundle: ^5.3 || ^6.0
- doctrine/dbal: ^3.6 || ^4.0
- symfony/config: ^6.4 || ^7.0 || ^8.0
- symfony/dependency-injection: ^6.4 || ^7.0 || ^8.0
- symfony/http-foundation: ^6.4 || ^7.0 || ^8.0
- symfony/http-kernel: ^6.4 || ^7.0 || ^8.0
- symfony/translation-contracts: ^3.0
- twig/twig: ^3.8
Requires (Dev)
- contao/manager-plugin: ^2.0
- contao/test-case: ^5.3 || ^6.0
Suggests
None
Provides
None
Conflicts
- contao/manager-plugin: <2.0 || >=3.0
Replaces
None
This package is auto-updated.
Last update: 2026-10-09 11:04:16 UTC
README
Contao Bootstrap Responsive Youtube Embed
This bundle provides a Youtube/Vimeo/Dropbox Player content element for the Contao CMS. Create responsive video embeds based on the width of the parent by creating an intrinsic ratio that scales on any device.
Requirements
- Contao 5.3 or later, including Contao 6
- Bootstrap 5 (the player uses the
ratiohelper classes)
Video Id
In the backend you have to fill in the video id input.
| Youtube | Vimeo | Dropbox |
|---|---|---|
| https://www.youtube.com/watch?v=###movieId### | https://vimeo.com/###movieId### | https://dl.dropboxusercontent.com/s/###movieId### |
| Get the shareable youtube link: https://www.youtube.com/watch?v=a7D3A_wwl0g | Get the shareable vimeo link: https://vimeo.com/479750109 | Get the shareabe dropbox link: https://dl.dropboxusercontent.com/s/wtx6x44y61wsxj/sample.mp4?dl=0 |
| Everything from "?v=" belongs to the movieId => a7D3A_wwl0g | Everything from ".com/" belongs to the movieId => 479750109 | Everything from ".com/s/" belongs to the movieId => wtx6x44y61wsxj/sample.mp4?dl=0 |
Contao Inserttag
The extension supports Contao Insert tags to embed videos.
<div>
{{bootstrapResponsiveYoutubeEmbed::a7D3A_wwl0g}}
<!-- or a bit more complex -->
{{bootstrapResponsiveYoutubeEmbed::a7D3A_wwl0g?autoplay=1&caption=Lorem ipsum&playerAspectRatio=4x3}}
</div>
Options: autoplay (1 or true), caption, playerAspectRatio (1x1, 4x3, 16x9, 21x9) and playerType (youtube, vimeo, dropbox). Without playerType, numeric ids are treated as Vimeo videos and all other ids as YouTube videos.
Templates
content_element/bootstrap_youtube_responsive_embed.html.twig: the content elementcomponent/_bootstrap_youtube_responsive_embed.html.twig: the player itself, used by the content element and the insert tag
Both templates use the variables player_type, movie_id, aspect_ratio, autoplay and caption. The component provides the blocks player and caption.
Upgrading to version 3
The template variables have been renamed (e.g. playerAspectRatio is now aspect_ratio, movieId is now movie_id) and the player has been moved to the component template. Custom templates of the content element have to be adjusted.

