diff --git a/src/variables/VideoEmbedderVariable.php b/src/variables/VideoEmbedderVariable.php index b0f19bc..13c1352 100644 --- a/src/variables/VideoEmbedderVariable.php +++ b/src/variables/VideoEmbedderVariable.php @@ -110,7 +110,8 @@ public function getAspectRatio($url) { * **/ public function getProviderName($url) { - return Template::raw(VideoEmbedder::$plugin->service->getInfo($url)->providerName); + $provider = VideoEmbedder::$plugin->service->getInfo($url)->providerName ?? VideoEmbedder::$plugin->service->getInfo($url)->provider_name; + return Template::raw($provider); } /**