70768[FEATURE] Configure muted, loop and controls per video file reference
Commit message
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 35
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/68/70768/35 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/68/70768/35 && git cherry-pick FETCH_HEAD
Review
-
Code review CR -1 Needs a vote
- Garvin Hicking -1
- Simon Schaufelberger +1
-
Verified V +1 Needs a vote
- Simon Schaufelberger +1
- core-ci +1 CI
Merge conflicts 12
- main 97555[TASK] Deprecate online media helpers
- main 84995[FEATURE] Allow assigning users to groups in group editor
- main 96653[!!!][TASK] Restrict TCA overrides for types and special values
- main 95105[TASK] Apply PHP code simplifications
- main 96741[FEATURE] Add preview images for videos
- main 93287[WIP] Labels
- main 91423[WIP][TASK] Move config values to both section columns and config
- main 92851[WIP][FEATURE] Allow simplified TCA configuration (Test II)
- main 66214[FEATURE] Allow text-track files for videos
- main 68148[FEATURE] Add video platform name to iframe title
- main 91276[WIP][FEATURE] Switch to list module if page module is on a folder
- main 65186[FEATURE] Add option for the video poster attribute
Issues 1
Files 9
- typo3/sysext/core/Classes/Resource/Rendering/VideoTagRenderer.php25+3 −5
- typo3/sysext/core/Classes/Resource/Rendering/VimeoRenderer.php+9 −6
- typo3/sysext/core/Classes/Resource/Rendering/YouTubeRenderer.php+6 −6
- typo3/sysext/core/Configuration/TCA/sys_file_reference.php4+28 −1
- typo3/sysext/core/Documentation/Changelog/15.0/Feature-95004-ConfigureVideoPlaybackPerFile.rstnew+43 −0
- typo3/sysext/core/Resources/Private/Language/locallang_tca.xlf+9 −0
- typo3/sysext/core/Tests/Unit/Resource/Rendering/VideoTagRendererTest.php2+47 −0
- typo3/sysext/core/Tests/Unit/Resource/Rendering/VimeoRendererTest.php+36 −1
- typo3/sysext/core/Tests/Unit/Resource/Rendering/YouTubeRendererTest.php+35 −1
Review log 73110
Show 5385 earlier messages
-
Sascha Englert uploaded patch set 1 08/26/21, 11:21
-
core-ci voted on patch set 1 V -1 08/26/21, 11:25 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15662
-
Sascha Englert uploaded patch set 2 08/26/21, 11:40
-
core-ci voted on patch set 2 V -1 08/26/21, 12:01 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15667
-
Sascha Englert uploaded patch set 3 08/27/21, 07:55
-
core-ci voted on patch set 3 V -1 08/27/21, 08:11 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15704
-
Sascha Englert uploaded patch set 4 08/27/21, 08:18
-
core-ci voted on patch set 4 V +1 08/27/21, 08:40 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15707
-
Sascha Englert uploaded patch set 5 08/27/21, 09:39
-
core-ci voted on patch set 5 V -1 08/27/21, 10:00 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15713
-
core-ci voted on patch set 5 V +1 08/27/21, 11:21 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15713
-
Simon Gilli commented on patch set 5 CR -1 08/27/21, 11:23
Thanks! Found some minor issues on a quick sight.VideoTagRenderer.php:35That's a breaking change, please revert as breaking changes are not allowed at this time.ext_tables.sql:275Use tabs for indention here please. -
Sascha Englert marked it ready for review 08/27/21, 11:23
-
Sascha Englert uploaded patch set 6 08/27/21, 11:36
-
core-ci voted on patch set 6 V +1 08/27/21, 11:51 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15717
-
Sascha Englert commented on patch set 6 08/27/21, 13:15
This change is ready for review.VideoTagRenderer.php:35ReplyThe only place the property is used is in Line 59 and there are no classes that extend the class. As far as I can see I have two options to avoid declaring the array as const: 1) Duplicate the array and add it to my UserFunc Class, which is harder to maintain as mime types may change in the future. 2) Create a getter and use makeInstance to get the array. Creating the an object just for one access is in my opinion a waste of resources.ext_tables.sql:275ReplyDone -
Oliver Klee commented on patch set 6 08/27/21, 13:24
I don't want to spoil the fun ;-) … but should "fun" be "function" instead? Or something else? -
Sascha Englert updated the commit message in patch set 7 08/27/21, 13:25
-
Sascha Englert commented on patch set 7 08/27/21, 13:26
Reply
Done -
core-ci voted on patch set 7 V +1 08/27/21, 13:48 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15726
-
Oliver Klee wrote 08/27/21, 13:54
Removed reviewer Oliver Klee. -
Sascha Englert uploaded patch set 8 08/30/21, 11:48
-
Sascha Englert commented on patch set 8 08/30/21, 11:49
VideoTagRenderer.php:35ReplyAdded an internal getter instead and injected the renderer into the user func -
Sascha Englert uploaded patch set 9 08/30/21, 11:50
-
core-ci voted on patch set 8 V -1 08/30/21, 11:52 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15858
-
core-ci voted on patch set 9 V -1 08/30/21, 11:54 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15859
-
Sascha Englert uploaded patch set 10 08/30/21, 11:57
-
core-ci voted on patch set 10 V +1 08/30/21, 12:28 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15861
-
Guido Schmechel commented on patch set 10 08/30/21, 21:32
Hi Sascha, it's nice that someone takes up the approach and wants to continue! I took a look at the whole thing and found a few little things. In addition, I can't add a video to the content element with the current dev version. I get the following error message: Core: Exception handler (WEB): Uncaught TYPO3 Exception: Too few arguments to function TYPO3\CMS\Core\UserFunc\VideoFiles::__construct(), 0 passed in /var/www/html/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 3266 and exactly 1 expected | ArgumentCountError thrown in file /var/www/html/typo3/sysext/core/Classes/UserFunc/VideoFiles.php in line 35 Caches were all emptied, of course. Maybe you have some clues?"user function" (See Olis hint)VideoFiles.php:27Two spaces before =VideoFiles.php:41A think the function name is clear enough. Just remove this line :-)VideoFiles.php:60If I see it correctly, this function is not being used at all so far? If you really want to offer it, you would also have to consider https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/7.5/Feature-61799-ImprovedHandlingOfOnlineMedia.html#register-your-own-online-media-service.ext_tables.sql:276No backticks neccessary -
Sascha Englert uploaded patch set 11 08/31/21, 07:28
-
Sascha Englert commented on patch set 10 08/31/21, 07:29
Reply
Did you start with a clean install? If not deleting var/ should help. I got to admit the whole DI stuff is pretty much black magic to me 😕Reply
Damit, fixed it in gerrit but not in git ...VideoFiles.php:27ReplyDoneVideoFiles.php:41ReplyDoneVideoFiles.php:60ReplyHm, I am not 100 % sure whether the class should deal with custom file extensions at this point. It just deals with displaying the correct fields for the known extensions. The developer could always just overwrite/extend the class like the TCA. But yeah you are right, it is currently not in use. So I remove it.ext_tables.sql:276ReplyReally? I get warnings from phpstorm. -
core-ci voted on patch set 11 V +1 08/31/21, 07:47 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15907
-
Simon Gilli commented on patch set 11 09/04/21, 21:37
Thanks for the changes, still some minor things and questions.VideoTagRenderer.php:38Maybe also write a @todo here so this can be changed for the next major release....VideoFiles.php:27Looks like this is not used longer in the latest PS.ext_tables.sql:276I don't think loop is a reserved word, is it? -
Sascha Englert uploaded patch set 12 09/06/21, 06:40
-
Sascha Englert commented on patch set 12 09/06/21, 06:41
VideoTagRenderer.php:38ReplyDoneVideoFiles.php:27ReplyDoneext_tables.sql:276ReplyDone -
core-ci voted on patch set 12 V -1 09/06/21, 07:16 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16301
-
core-ci voted on patch set 12 V +1 09/06/21, 08:53 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16301
-
Sascha Englert uploaded patch set 13 09/07/21, 06:55
-
core-ci voted on patch set 13 V +1 09/07/21, 07:15 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16366
-
Sascha Englert commented on patch set 13 09/13/21, 10:42
ext_tables.sql:276ReplyDone -
Sascha Englert updated the commit message in patch set 14 09/13/21, 10:59
-
core-ci voted on patch set 14 V +1 09/13/21, 11:10 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16640
-
Simon Gilli commented on patch set 14 09/16/21, 17:38
VideoTagRenderer.php:35ReplyDone -
Benni Mack wrote 11/29/21, 10:08
Change destination moved from master to main -
Benni Mack updated the commit message in patch set 15 11/29/21, 13:29
-
core-ci voted on patch set 15 V +1 11/29/21, 14:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20038
-
Simon Schaufelberger uploaded patch set 16 03/22/22, 23:31
-
core-ci voted on patch set 16 V -1 03/22/22, 23:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25063
-
Simon Schaufelberger uploaded patch set 17 03/22/22, 23:51
-
core-ci voted on patch set 17 V +1 03/22/22, 23:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25065
-
Simon Schaufelberger uploaded patch set 18 06/06/22, 18:24
-
core-ci voted on patch set 18 V -1 06/06/22, 18:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27735
-
Simon Schaufelberger rebased onto patch set 19 06/06/22, 19:15
-
core-ci voted on patch set 19 V -1 06/06/22, 19:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27743
-
Oliver Klee commented on patch set 19 06/06/22, 20:56
Feature-95004-AddedBetterSupportForHTML5VideoTag.rst:1According to the CI failure, this needs to be: .. include:: /Includes.rst.txt -
Simon Schaufelberger uploaded patch set 20 06/06/22, 21:15
-
Simon Schaufelberger commented on patch set 19 06/06/22, 21:17
Feature-95004-AddedBetterSupportForHTML5VideoTag.rst:1ReplyDone -
Simon Schaufelberger commented on patch set 20 06/06/22, 21:19
Reply
Done -
core-ci voted on patch set 20 V +1 06/06/22, 21:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27757
-
Oliver Klee wrote 06/10/22, 21:41
Removed cc Oliver Klee. -
Simon Schaufelberger uploaded patch set 21
V +106/29/23, 05:50 -
Simon Schaufelberger uploaded patch set 22 06/29/23, 05:50
-
core-ci voted on patch set 21 V -1 06/29/23, 06:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43095
-
core-ci voted on patch set 22 V -1 06/29/23, 06:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43096
-
Simon Schaufelberger uploaded patch set 23
V -106/29/23, 12:13 -
core-ci voted on patch set 23 V -1 06/29/23, 12:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43111
-
Simon Schaufelberger uploaded patch set 24
V -106/29/23, 13:24 -
core-ci voted on patch set 24 V +1 06/29/23, 13:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43113
-
Oliver Klee updated the commit message in patch set 25
V +106/29/23, 19:55 -
core-ci voted on patch set 25 V +1 06/29/23, 20:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43124
-
Simon Schaufelberger voted on patch set 25 V +1 CR +1 06/29/23, 23:22
-
Simon Schaufelberger uploaded patch set 26
CR +1V +106/29/23, 23:31 -
Simon Schaufelberger voted on patch set 26 V +1 CR +1 06/29/23, 23:32
-
core-ci voted on patch set 26 V +1 06/29/23, 23:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43127
-
Georg Ringer commented on patch set 26 08/03/24, 08:32
should we finally bring that to 13? IMO a lot of code can be also removed, also would just hardcoded the mimes in the userfunc instead of calling the videotagrenderer -
Garvin Hicking commented on patch set 26 08/05/24, 19:50
Reply
The code does need some adjustments (personally not fond of inline static functions), but functionality-wise I'd like to have this. Option like "preload" could maybe even be utilized as a "lazyload" attribute for image sys-file-references. "Spamming" extra very specific tca/db columns though feels a bit like it might be better to have more abstraction for future fields. Serialized data like "crop" isn't too great either, and complexity of an extra relation is high and impacts performance - so in the end I think extra columns with their bool toggles might be ok. -
Simon Schaufelberger uploaded patch set 27
CR +1V +112/06/24, 12:26 -
core-ci voted on patch set 27 V -1 12/06/24, 12:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70704
-
Simon Schaufelberger uploaded patch set 28
V -112/10/24, 15:13 -
core-ci voted on patch set 28 V -1 12/10/24, 15:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70865
-
Simon Schaufelberger uploaded patch set 29
V -112/10/24, 15:26 -
core-ci voted on patch set 29 V +1 12/10/24, 15:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70866
-
Simon Schaufelberger voted on patch set 29 CR +1 V +1 12/10/24, 15:33
-
Guido Schmechel uploaded patch set 30
CR +1V +112/13/24, 22:13 -
core-ci voted on patch set 30 V +1 12/13/24, 22:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71079
-
Simon Schaufelberger voted on patch set 30 CR +1 V +1 12/13/24, 22:20
-
Guido Schmechel commented on patch set 30 CR -1 12/13/24, 23:31
VideoTagRenderer.php:125In my case, preload=‘none’ was generated by default in the output. It should be 'auto' at 0. The problem could be solved with strict type in match conditions.VideoTagRendererTest.php:128I think we need a different test here, because this does not match the match function and the attribute is only passed through. -
Guido Schmechel uploaded patch set 31
CR +1V +112/15/24, 10:39 -
Guido Schmechel commented on patch set 31 12/15/24, 10:40
VideoTagRenderer.php:125ReplyDone -
core-ci voted on patch set 31 V -1 12/15/24, 10:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71134
-
Guido Schmechel commented on patch set 31 12/15/24, 10:52
The unit tests deliberately fail. In the code, the instance of FileInterface is queried, but we send a mock to this test. Unfortunately, I don't know how to control this. -
Simon Schaufelberger uploaded patch set 32
V -103/27/26, 10:09 -
Simon Schaufelberger commented on patch set 32 CR +1 V +1 03/27/26, 10:09
VideoTagRendererTest.php:128ReplyDone -
Simon Schaufelberger uploaded patch set 33
CR +1V +103/27/26, 10:35 -
core-ci voted on patch set 32 V -1 03/27/26, 10:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98850
-
Simon Schaufelberger voted on patch set 33 CR +1 V +1 03/27/26, 10:42
-
core-ci voted on patch set 33 V +1 03/27/26, 11:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98853
-
Simon Praetorius commented on patch set 33 CR -1 03/27/26, 11:17
VideoTagRenderer.php:23I don't think this needs to be publicVideoTagRenderer.php:98I'd avoid passing things by reference throughout these methods. Also, I think that these conditions can be simplified quite a bit, e. g. by checking for `FileReference` early. Currently, I find it quite hard to understand what actually happens here.VideoTagRenderer.php:101I'd avoid that closure and (if really necessary) define a proper private method instead.VideoTagRenderer.php:158I'd avoid that closure and (if really necessary) define a proper private method instead.VideoTagRenderer.php:184This could be done separately as a `[TASK]` (and possibly even be backported to v13)VideoTagRenderer.php:185This is a duplicate of line 196.VideoFiles.php:25I think this one should be `@internal`, since it's quite limited because of hardcoded field names. Also, it should be `final`.sys_file_reference.php:191Not sure if that is really useful for editors, since it isn't relevant to the actual content. -
Simon Schaufelberger commented on patch set 33 03/27/26, 11:30
VideoTagRenderer.php:23ReplyDoneVideoTagRenderer.php:98ReplyDoneVideoTagRenderer.php:101ReplyDoneVideoTagRenderer.php:158ReplyDoneVideoTagRenderer.php:185ReplyDoneVideoFiles.php:25ReplyDone -
Simon Schaufelberger commented on patch set 33 03/27/26, 11:32
sys_file_reference.php:191Replyany suggestions? That would be helpful because I don't know what to do now as I only finalized the patch from someone else. -
Simon Schaufelberger uploaded patch set 34
CR +1V +103/27/26, 11:32 -
core-ci voted on patch set 34 V +1 03/27/26, 11:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98857
-
Simon Schaufelberger voted on patch set 34 CR +1 V +1 03/27/26, 11:42
-
Simon Praetorius commented on patch set 34 03/27/26, 12:27
VideoTagRenderer.php:97Maybe the whole method is now only a foreach loop over some fields and can be stripped altogether?VideoTagRenderer.php:117I'd remove the magic code here and possibly apply this in a separate patch, probably for `$options` in general, not just related to the file?VideoFiles.php:28Still thinking about this class. I'm wondering if there's a better way to achieve this. Currently, this feels like a hack. If we don't find a better way, the naming should be improved here and inline documentation should be added which describes why and where this is used.sys_file_reference.php:191ReplyI'd remove it. -
Benni Mack uploaded patch set 35
CR +1V +111/11/26, 13:06 -
Benni Mack commented on patch set 35 11/11/26, 13:09
VideoTagRenderer.php:97ReplyDoneVideoTagRenderer.php:117ReplyDoneVideoTagRenderer.php:184ReplyDoneVideoFiles.php:28ReplyDonesys_file_reference.php:191ReplyDone -
Benni Mack commented on patch set 35 11/11/26, 13:10
VideoTagRenderer.php:184ReplyI decided against that btw. -
core-ci voted on patch set 35 V +1 11/11/26, 13:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114076
-
Simon Schaufelberger voted on patch set 35 CR +1 V +1 11/11/26, 21:23
-
Garvin Hicking commented on patch set 35 CR -1 11/12/26, 08:01
Unresolved
This generally works, but needs some UI love. Missing labels and the placing of the checkboxes seems a bit awkward, maybe the need be grouped in a palette or so.