benjaminkott / benjaminkott/bootstrap_package

Autoplay option of file references doesn't work

Open
#1,510 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
PHP
Stars
355
Forks
212
Avg merge
1h 4m
Merged PRs (30d)
31

Description

# Bug Report

## Prerequisites

* [X] Can you reproduce the problem on TYPO3 v11.5 LTS
* [ ] Can you reproduce the problem on TYPO3 v12.4 LTS
* [X] Did you [perform a cursory search](https://github.com/issues?q=is%3Aissue+user%3Abenjaminkott+repo%3Abenjaminkott%2Fbootstrap_package)
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](https://github.com/user-attachments/assets/bbc4b018-57ad-4927-ba0e-6d8e49130d5f)

![grafik](https://github.com/user-attachments/assets/207b145f-883e-42ad-85ad-b243bdfc025a)

## 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 ``). 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:

```typoscript
lib.contentElement.settings.media.additionalConfig.autoplay >
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the TypoScript configuration for lib.contentElement.settings.media.additionalConfig.autoplay and compare it with TYPO3's VideoTagRenderer behavior linked in the issue. Verify the change with a Media content element containing a video whose individual file reference enables autoplay; done means the rendered video includes the autoplay attribute without forcing a global setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.