Commit 2b4713ca authored by Guido Schmechel's avatar Guido Schmechel Committed by Benni Mack
Browse files

[TASK] Support for vimeo event url

Resolves: #94357
Releases: master, 10.4
Change-Id: I8c074372c3c42b8c5a74afff7b9fb386c2f136a2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69953


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Torben Hansen's avatarTorben Hansen <derhansen@gmail.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Torben Hansen's avatarTorben Hansen <derhansen@gmail.com>
Reviewed-by: Rudy Gnodde's avatarRudy Gnodde <rudy@famouswolf.com>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent d0faa44b
......@@ -73,8 +73,9 @@ class VimeoHelper extends AbstractOEmbedHelper
// Try to get the Vimeo code from given url.
// Next formats are supported with and without http(s)://
// - vimeo.com/<code>/<optionalPrivateCode> # Share URL
// - vimeo.com/event/<code>
// - player.vimeo.com/video/<code>/<optionalPrivateCode> # URL form iframe embed code, can also get code from full iframe snippet
if (preg_match('/vimeo\.com\/(?:video\/)?([0-9a-z\/]+)/i', $url, $matches)) {
if (preg_match('/vimeo\.com\/(?:video|event\/)?([0-9a-z\/]+)/i', $url, $matches)) {
$videoId = $matches[1];
}
if (empty($videoId)) {
......
......@@ -82,7 +82,8 @@ class VimeoHelperTest extends UnitTestCase
['https://vimeo.com/', '7215347324', $fileResourceMock],
['https://vimeo.com/', '7215347324/hasf8a65sdsa7d', $fileResourceMock],
['https://player.vimeo.com/', '7215347324', $fileResourceMock],
['https://player.vimeo.com/', '7215347324/hasf8a65sdsa7d', $fileResourceMock]
['https://player.vimeo.com/', '7215347324/hasf8a65sdsa7d', $fileResourceMock],
['https://vimeo.com/event/', '7215347324', $fileResourceMock],
];
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment