Skip to content
Snippets Groups Projects
Commit 20a2dba0 authored by Nicolas's avatar Nicolas
Browse files

Issue #3417567: Support Youtube Live urls

parent c11e0f55
No related branches found
No related tags found
2 merge requests!64Issue #3417567: Support Youtube Live urls,!21Issue #3313587: Missing Drupal Behaviors for added content by formatters.
Pipeline #446870 passed
......@@ -89,7 +89,7 @@ class YouTube extends ProviderPluginBase {
* {@inheritdoc}
*/
public static function getIdFromInput($input) {
preg_match('/^https?:\/\/(www\.)?((?!.*list=)youtube\.com\/watch\?.*v=|youtu\.be\/)(?<id>[0-9A-Za-z_-]*)/', $input, $matches);
preg_match('/^https?:\/\/(www\.)?((?!.*list=)youtube\.com\/(watch\?.*v=|live\/)|youtu\.be\/)(?<id>[0-9A-Za-z_-]*)/', $input, $matches);
return $matches['id'] ?? FALSE;
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment