Skip to content
Snippets Groups Projects
Commit 917f62b7 authored by Kevin Paxman's avatar Kevin Paxman
Browse files

ISTWCMS-7241: add identifier for YouTube playlists

parent 724e0df1
No related branches found
No related tags found
1 merge request!256ISTWCMS-7241: add identifier for YouTube playlists
......@@ -69,6 +69,12 @@ class UwCblRemoteVideoEventSubscriber extends UwCblBase implements EventSubscrib
// Set the type of video to YouTube.
$remote_video['view']['type'] = 'YouTube';
}
// Check for YouTube playlist.
elseif (preg_match($pattern = '/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.?be)\/(playlist\?list=)([a-zA-Z0-9_-]+)$/', $remote_video['view']['url'])) {
// Set the type of video to YouTube playlist
$remote_video['view']['type'] = 'YouTube playlist';
}
// Check for Vimeo.
elseif (strrpos($remote_video['view']['url'], 'vimeo')) {
......
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