- Issue created by @driean96
- 🇷🇸Serbia levmyshkin Novi Sad, Serbia
Hi driean96, EBT/EPT modules don't support background videos for now. I thought about adding it for EBT Hero module:
https://www.drupal.org/project/ebt_hero →Usually landing pages use background video in hero block.
But it's possible use Background media field for videos too. As you mentioned there are different sources for videos: local file, youtube, vimeo, etc. Each source will need own javascript plugin, becuase only CSS is not enough for background video and we need to resize video properly on window resize.
https://www.w3schools.com/howto/howto_css_fullscreen_video.asp
Here is an example of simple background video for local file. I think I will start from this.For Youtube, Vimeo or any other platform it will need for separate javascript plugin, because each platform has own options to play embeded videos:
https://github.com/pupunzi/jquery.mb.YTPlayer
https://github.com/pupunzi/jquery.mb.vimeo_playerBulletproof solution for playing videos is video.js:
https://github.com/videojs/video.js
But it's massive piece of code:
https://unpkg.com/video.js/dist/video.min.jsWe need to have javascript plugin for background video, because there are different options always needed for different sites: play video once, disable video on mobile and show plain image, stop playing video after block not in focus, etc. Without options Background video funcitonality will be hard to use for commercial projects, different clients will expect different behavior for background video.
https://www.drupal.org/project/video_embed_field → (see Video providers)I also need to think about using specific sources like Brighcove and maybe use plugins or at least altering background video types.
It's a good idea to add Background video support, so I need to plan how to implement it better from first time.
Here is another Drupal module which tried to add background video support:
https://github.com/xenomedia/xeno_hero/issues/8
They also was struggling with different options and side effects, like parallax images overlap.I will have a look different implementations for background videos functionality and create something for EBT/EPT core modules at least for Local File and Youtube.
- 🇷🇸Serbia levmyshkin Novi Sad, Serbia
Wow... I just found out, that I already implemented Youtube background videos without any options. It's working for me actually:
https://drupalbook.org/ebt/demo#background_videoDo you have any errors on page with YouTube video? Thank you for your report, I will continue on this ticket and add Background Video options and local video implementation.
-
levmyshkin →
committed 9ad0c8c3 on 1.4.x
Issue #3444547 by driean96: Add settings for background video
-
levmyshkin →
committed 9ad0c8c3 on 1.4.x
-
levmyshkin →
committed 2badeb09 on 1.4.x
#3444547 by driean96: Background video is not working for any EBT
-
levmyshkin →
committed 2badeb09 on 1.4.x
- 🇷🇸Serbia levmyshkin Novi Sad, Serbia
I added new releases with support for Youtube/Local videos and added settings for background videos:
https://www.drupal.org/project/ebt_core/releases/1.4.24 →
https://www.drupal.org/project/ept_core/releases/1.4.7 → - Status changed to Fixed
7 months ago 5:46pm 5 May 2024