diff --git a/filter.php b/filter.php
index 19fa2fd79f4b0722aced2bd1489c6cb805932195..df1b269c921432af0ae34f603f8e855b2be1a462 100644
--- a/filter.php
+++ b/filter.php
@@ -49,7 +49,7 @@ class filter_opencast extends moodle_text_filter {
             $baseurl = get_config('tool_opencast', 'apiurl');
         }
 
-        if (stripos($text, '</video>') === false) {
+        if (stripos($text, $baseurl) === false) {
             // Performance shortcut - if there are no </video> tags, nothing can match.
             return $text;
         }