Skip to content
Snippets Groups Projects
Commit 3f45181e authored by David Breitling's avatar David Breitling
Browse files

[BUGFIX] fix certain vimeo videos not loading in glightbox

parent ad21f8bd
No related branches found
No related tags found
1 merge request!1[BUGFIX] fix certain vimeo videos not loading in glightbox
......@@ -54,6 +54,19 @@ class VimeoController extends ActionController {
return;
}
foreach ($response['items'] as &$item) {
/*
* Check if link is of the form "https://vimeo.com/123456789", not "https://vimeo.com/username/videoname".
* Just checks if the end of `link` is the same as `videoId`, and if not, it replaces `link`.
* This is needed as a workaround so that glightbox can detect the video as a vimeo video correctly in the frontend.
*/
$endOfLink = substr($item['link'], -strlen($item['videoId']));
if (!((int) $endOfLink === $item['videoId'])) {
$item['link'] = strstr($item['link'], '.com/', true) . '.com/' . $item['videoId'];
}
}
$showApiResult = (int) ($this->settings['showApiResult'] ?? 1);
$context = GeneralUtility::getApplicationContext();
// disable API debug output in production context
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment