diff --git a/typo3/sysext/core/Classes/Resource/Rendering/VimeoRenderer.php b/typo3/sysext/core/Classes/Resource/Rendering/VimeoRenderer.php index b8d935032fedc39fc53ad419fca91bed56f85d6f..51ee4b99862c9779eba04971754d1e583f58dc3a 100644 --- a/typo3/sysext/core/Classes/Resource/Rendering/VimeoRenderer.php +++ b/typo3/sysext/core/Classes/Resource/Rendering/VimeoRenderer.php @@ -144,6 +144,9 @@ class VimeoRenderer implements FileRendererInterface if (isset($options['api']) && (int)$options['api'] === 1) { $urlParams[] = 'api=1'; } + if (!empty($options['no-cookie'])) { + $urlParams[] = 'dnt=1'; + } $urlParams[] = 'title=' . (int)!empty($options['showinfo']); $urlParams[] = 'byline=' . (int)!empty($options['showinfo']); $urlParams[] = 'portrait=0'; diff --git a/typo3/sysext/core/Tests/Unit/Resource/Rendering/VimeoRendererTest.php b/typo3/sysext/core/Tests/Unit/Resource/Rendering/VimeoRendererTest.php index cb1db8f9be6a1bc02eeab8e2fef75d5c413d5de8..41b4f6f28cf1f013a841aa5f5ba4b281aac05688 100644 --- a/typo3/sysext/core/Tests/Unit/Resource/Rendering/VimeoRendererTest.php +++ b/typo3/sysext/core/Tests/Unit/Resource/Rendering/VimeoRendererTest.php @@ -283,4 +283,18 @@ class VimeoRendererTest extends UnitTestCase $this->subject->render($fileResourceMock, '300m', '200', ['api' => 1]) ); } + + /** + * @test + */ + public function renderOutputWithDisabledNoCookieIsCorrect() + { + /** @var File|\PHPUnit_Framework_MockObject_MockObject $fileResourceMock */ + $fileResourceMock = $this->createMock(File::class); + + self::assertSame( + '<iframe src="https://player.vimeo.com/video/7331?api=1&dnt=1&title=0&byline=0&portrait=0" allowfullscreen width="300" height="200" allow="fullscreen"></iframe>', + $this->subject->render($fileResourceMock, '300m', '200', ['api' => 1, 'no-cookie' => 1]) + ); + } }