Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoplay option of file references doesn't work #1510

Open
2 of 3 tasks
fishbone1 opened this issue Sep 26, 2024 · 0 comments
Open
2 of 3 tasks

Autoplay option of file references doesn't work #1510

fishbone1 opened this issue Sep 26, 2024 · 0 comments
Labels

Comments

@fishbone1
Copy link

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v11.5 LTS
  • Can you reproduce the problem on TYPO3 v12.4 LTS
  • Did you perform a cursory search
    to see if your bug or enhancement is already reported?

Description

The "autoplay" setting of individual file references in the Media content element is not respected.

Steps to Reproduce

  1. Add a media content element to a page
  2. Add a video media element
  3. Enable the autoplay option
  4. View the page

Expected behavior

The video element has the "autoplay" attribute and autoplays.

Actual behavior

The video element has no "autoplay" attribute and doesn't autoplay.

Screenshots

grafik

grafik

Additional information

Bootstrap Package defines globally for all videos whether autoplay is enabled or not. This makes no sense to me and breaks the "individual autoplay" feature for sys_file_references.

TYPO3's VideoTagRenderer checks if autoplay is passed as an option / additionalConfig (e.g. in <f:media>). If not, is uses the file reference's autoplay option:
https://github.com/TYPO3/typo3/blob/28d3a8c5e0b2e60cefdccf89cf47e6ce31bed5e3/typo3/sysext/core/Classes/Resource/Rendering/VideoTagRenderer.php#L67

Unfortunately Bootstrap Package always sets this additionalConfig. You can either set it to 1 or 0 with the constant plugin.bootstrap_package_contentelements.media.additionalConfig.autoplay.

Workaround

Unset the value in setup.typoscript:

lib.contentElement.settings.media.additionalConfig.autoplay >
@fishbone1 fishbone1 added the bug label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant