Loading README.md +2 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,8 @@ the video URLs that you will use with the Video Embed Field. REQUIREMENTS ------------ Installed Video Embed Field. And a field created with the type of video_embed_field. Installed Video Embed Field. And a field created with the type of video_embed_field. INSTALLATION Loading src/Plugin/video_embed_field/Provider/CloudflareStream.php +3 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class CloudflareStream extends ProviderPluginBase { */ public static function getIdFromInput($input) { preg_match('/^https?:\/\/(watch|iframe).videodelivery.net\/(?<id>[0-9a-zA-Z-_]{2,32}).*?(\?startTime=(\d+))?$/', $input, $matches); return isset($matches['id']) ? $matches['id'] : FALSE; return $matches['id'] ?? FALSE; } /** Loading Loading @@ -64,9 +64,10 @@ class CloudflareStream extends ProviderPluginBase { * {@inheritdoc} */ public function getRemoteThumbnailUrl() { // @TODO: Implement generating animated thumbnails. // @todo Implement generating animated thumbnails. // https://videodelivery.net/%s/thumbnails/thumbnail.gif?time=3s&height=200&duration=4s $url = 'https://videodelivery.net/%s/thumbnails/thumbnail.jpg'; return sprintf($url, $this->getVideoId()); } } Loading
README.md +2 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,8 @@ the video URLs that you will use with the Video Embed Field. REQUIREMENTS ------------ Installed Video Embed Field. And a field created with the type of video_embed_field. Installed Video Embed Field. And a field created with the type of video_embed_field. INSTALLATION Loading
src/Plugin/video_embed_field/Provider/CloudflareStream.php +3 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class CloudflareStream extends ProviderPluginBase { */ public static function getIdFromInput($input) { preg_match('/^https?:\/\/(watch|iframe).videodelivery.net\/(?<id>[0-9a-zA-Z-_]{2,32}).*?(\?startTime=(\d+))?$/', $input, $matches); return isset($matches['id']) ? $matches['id'] : FALSE; return $matches['id'] ?? FALSE; } /** Loading Loading @@ -64,9 +64,10 @@ class CloudflareStream extends ProviderPluginBase { * {@inheritdoc} */ public function getRemoteThumbnailUrl() { // @TODO: Implement generating animated thumbnails. // @todo Implement generating animated thumbnails. // https://videodelivery.net/%s/thumbnails/thumbnail.gif?time=3s&height=200&duration=4s $url = 'https://videodelivery.net/%s/thumbnails/thumbnail.jpg'; return sprintf($url, $this->getVideoId()); } }