Loading animation not diappearing on YouTube Videos (using cookies_video module)

Created on 21 September 2022, over 1 year ago
Updated 16 May 2023, about 1 year ago

Problem/Motivation

When using cookies_video module from https://www.drupal.org/project/cookies/ → the loading animation stays displayed on the video even after the video was fully loaded.

The class is-b-loading never disappears. This seems to be due to the "manual lazy loading" (data-src to src) after enabling cookies.

The cookies_video adapter can be found here: https://git.drupalcode.org/project/cookies/-/blob/1.1.x/modules/cookies_...
The blazy integration was added here: #3219257: Integrate cookies_video with Blazy oEmbed formatter →

But I guess the JavaScript used in blazy is simply not made for "later" lazy-loading?

Edit: Interestingly this seems like a race condition, especially with multiple YouTube Videos on one page. In some cases it works!

Steps to reproduce

  1. Enable blazy
  2. Enable cookies_video module from https://www.drupal.org/project/cookies/ →
  3. Place a YouTube Video which is blocked by cookies
  4. Enable video cookies by clicking the banner on the video
  5. Result: loading animation class is-b-loading is always present and the loading animation is overlaying the video center

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Fixed

Version

2.0

Component

JavaScript

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024