27 protected \ILIAS\MediaCast\InternalGUIService
$gui;
34 protected \ILIAS\DI\UIServices
$ui;
35 protected \ilLanguage
$lng;
45 $this->
ui = $DIC->ui();
46 $this->
lng = $DIC->language();
47 $this->media_cast = $obj;
49 $this->
user = $DIC->user();
50 $this->
ctrl = $DIC->ctrl();
52 $this->player_wrapper = $DIC->mediaObjects()
57 $this->mc_manager = $DIC->mediaCast()->internal()->domain()->mediaCast($obj);
58 $this->gui = $DIC->mediaCast()->internal()->gui();
69 $cmd = $ctrl->
getCmd(
"show");
71 switch ($next_class) {
72 case strtolower(ilMediaObjectsPlayerWrapperGUI::class):
77 if (in_array($cmd, array(
""))) {
85 $f = $this->
ui->factory();
91 foreach ($this->media_cast->getSortedItemsArray() as $med_item) {
92 $mob = new \ilObjMediaObject($med_item[
"mob_id"]);
95 $audio = $this->player_wrapper->audio(
97 $this->media_cast->getRefId()
100 if (is_null($audio)) {
106 $properties[$this->
lng->txt(
"mcst_duration")] = $med_item[
"playtime"];
108 if ($this->mc_manager->commentsActive()) {
109 $comments_gui = $this->gui->comments()->commentGUI(
110 $this->media_cast->getRefId(),
111 (
int) $med_item[
"id"]
114 $properties[$this->
lng->txt(
"comments")] =
$renderer->render(
$f->legacy()->content($comments_gui->getNumber()));
115 $actions[] = $comments_gui->getTriggerShyButton();
118 $item =
$f->item()->standard($mob->getTitle())
119 ->withAudioPlayer($audio)
120 ->withProperties($properties)
121 ->withDescription($mob->getDescription());
124 if ($mob->getVideoPreviewPic() !=
"") {
125 $item = $item->withLeadImage(
126 $f->image()->responsive($mob->getVideoPreviewPic(),
"")
130 if ($this->media_cast->getDownloadable()) {
133 $actions[] =
$f->button()->shy($lng->txt(
"download"), $download);
136 if (count($actions) > 0) {
137 $dd =
$f->dropdown()->standard($actions);
138 $item = $item->withActions($dd);
145 $list =
$f->panel()->listing()->standard(
146 $this->
lng->txt(
"mcst_audio_files"),
148 $f->item()->group(
"", $items)
152 if ($this->rss_link !==
"") {
154 $f->link()->standard(
155 $lng->txt(
"mcst_webfeed"),
159 $list = $list->withActions(
$f->dropdown()->standard($actions));
ilGlobalTemplateInterface $tpl
getCmd(?string $fallback_command=null)
setParameterByClass(string $a_class, string $a_parameter, $a_value)
__construct(\ilObjMediaCast $obj, ?ilGlobalTemplateInterface $tpl=null, string $rss_link="")
ILIAS MediaCast InternalGUIService $gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
forwardCommand(object $a_gui_object)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getNextClass($a_gui_class=null)
ilMediaObjectsPlayerWrapperGUI $player_wrapper
ILIAS MediaCast MediaCastManager $mc_manager
ilObjMediaCast $media_cast
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)