Skip to content
Snippets Groups Projects
Commit 27e361cd authored by Eric Bremner's avatar Eric Bremner
Browse files

Merge branch 'feature/ISTWCMS-7241-kpaxman-youtube_playlists' into '1.1.x'

ISTWCMS-7241: add identifier for YouTube playlists

See merge request !256
parents 724e0df1 eb0f341e
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 ...@@ -69,6 +69,12 @@ class UwCblRemoteVideoEventSubscriber extends UwCblBase implements EventSubscrib
// Set the type of video to YouTube. // Set the type of video to YouTube.
$remote_video['view']['type'] = '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. // Check for Vimeo.
elseif (strrpos($remote_video['view']['url'], '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