27 protected \ILIAS\DI\UIServices
$ui;
28 protected \ilLanguage
$lng;
34 string $dom_wrapper_id
38 $main_tpl->
addJavaScript(
"Modules/MediaCast/Video/js/video_widget.js");
41 $this->
ui = $DIC->ui();
42 $this->
lng = $DIC->language();
47 $this->video = $a_val;
61 $video = $ui->factory()->player()->video(
"")->withPoster(
"");
62 $video_tpl_html = $ui->renderer()->render($video);
63 $video_tpl_html = str_replace(
"\n",
"", $video_tpl_html);
65 $tpl = new \ilTemplate(
"tpl.wrapper.html",
true,
true,
"Modules/MediaCast/Video");
68 $tpl->setVariable(
"ID", $this->dom_wrapper_id);
69 $this->main_tpl->addOnLoadCode(
70 "il.VideoWidget.init('" . $this->dom_wrapper_id .
"', '" . $video_tpl_html .
"');" 74 $this->main_tpl->addOnLoadCode(
75 "il.VideoWidget.loadFile('" .
76 $this->dom_wrapper_id .
"', '" .
77 $this->
getVideo()->getResource() .
"', false);" 81 $item =
$f->item()->standard(
'#title#')
82 ->withDescription(
'#description#');
83 $item_html = $ui->renderer()->render($item);
84 $item_html = str_replace(
86 '<span data-elementtype="title"></span>',
89 $item_html = str_replace(
91 '<span data-elementtype="description-wrapper"><span data-elementtype="description"></span></span>',
94 $tpl->setVariable(
"ITEM", $item_html);
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl