27     protected \ILIAS\DI\UIServices 
$ui;
    28     protected \ilLanguage 
$lng;
    34         string $dom_wrapper_id
    41             $main_tpl->
addJavaScript(
"../components/ILIAS/MediaCast/resources/video_widget.js");
    46         $this->
ui = $DIC->ui();
    47         $this->
lng = $DIC->language();
    52         $this->video = $a_val;
    66         $video = $ui->factory()->player()->video(
"")->withPoster(
"");
    67         $video_tpl_html = $ui->renderer()->render($video);
    68         $video_tpl_html = str_replace([
"\n", 
"\r"], 
"", $video_tpl_html);
    70         $tpl = new \ilTemplate(
"tpl.wrapper.html", 
true, 
true, 
"components/ILIAS/MediaCast/Video");
    73         $tpl->setVariable(
"ID", $this->dom_wrapper_id);
    74         $this->main_tpl->addOnLoadCode(
    75             "il.VideoWidget.init('" . $this->dom_wrapper_id . 
"', '" . $video_tpl_html . 
"');"    86         $item = 
$f->item()->standard(
'#title#')
    87                   ->withDescription(
'#description#');
    88         $item_html = $ui->renderer()->render($item);
    89         $item_html = str_replace(
    91             '<span data-elementtype="title"></span>',
    94         $item_html = str_replace(
    96             '<span data-elementtype="description-wrapper"><span data-elementtype="description"></span></span>',
    99         $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.