diff --git a/components/ILIAS/UI/src/Implementation/Component/Player/Renderer.php b/components/ILIAS/UI/src/Implementation/Component/Player/Renderer.php index 9489d4788a3e..9b87f97e3b88 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Player/Renderer.php +++ b/components/ILIAS/UI/src/Implementation/Component/Player/Renderer.php @@ -45,7 +45,7 @@ public function renderAudio(Component\Component $component, RendererInterface $d { $tpl = $this->getTemplate("tpl.audio.html", true, true); - $id = $this->bindJavaScript($component); + $id = $this->bindJavaScript($component) ?? $this->createId(); if ($component->getTranscription() != "") { $factory = $this->getUIFactory(); @@ -96,7 +96,7 @@ public function renderVimeo( $tpl = $this->getTemplate("tpl.video_vimeo.html", true, true); - $id = $this->bindJavaScript($component); + $id = $this->bindJavaScript($component) ?? $this->createId(); $tpl->setVariable("ID", $id); $tpl->setVariable("SOURCE", $component->getSource()); @@ -111,7 +111,7 @@ public function renderYoutube( $tpl = $this->getTemplate("tpl.video_youtube.html", true, true); - $id = $this->bindJavaScript($component); + $id = $this->bindJavaScript($component) ?? $this->createId(); $tpl->setVariable("ID", $id); $tpl->setVariable("SOURCE", $component->getSource()); @@ -126,7 +126,7 @@ public function renderNative( $tpl = $this->getTemplate("tpl.video.html", true, true); - $id = $this->bindJavaScript($component); + $id = $this->bindJavaScript($component) ?? $this->createId(); foreach ($component->getSubtitleFiles() as $lang_key => $file) { $tpl->setCurrentBlock("track"); diff --git a/components/ILIAS/UI/tests/Component/Item/ItemTest.php b/components/ILIAS/UI/tests/Component/Item/ItemTest.php index a5bdc97ee7c7..696799b62e87 100755 --- a/components/ILIAS/UI/tests/Component/Item/ItemTest.php +++ b/components/ILIAS/UI/tests/Component/Item/ItemTest.php @@ -642,7 +642,7 @@ public function testRenderAudioPlayer(): void