/** * Edit media cast item */ function editCastItemObject() { global $tpl, $ilToolbar, $ilCtrl; $this->checkPermission("write"); // conversion toolbar include_once "./Services/MediaObjects/classes/class.ilFFmpeg.php"; if (ilFFmpeg::enabled()) { $this->mcst_item = new ilNewsItem($_GET["item_id"]); include_once "./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php"; $mob = new ilObjMediaObject($this->mcst_item->getMobId()); $conv_cnt = 0; // we had other purposes as source as well, but // currently only "Standard" is implemented in the convertFile method foreach (array("Standard") as $p) { /* $med = $mob->getMediaItem($p); if (is_object($med)) { $options = ilFFmpeg::getPossibleTargetMimeTypes($med->getFormat()); if (count($options) > 0) { if ($conv_cnt > 0) { $ilToolbar->addSeparator(); } include_once("./Services/Form/classes/class.ilSelectInputGUI.php"); $si = new ilSelectInputGUI($this->lng->txt("mcst_conv_". strtolower($p)."_to"), "target_format"); $si->setOptions($options); $ilToolbar->addInputItem($si, true); $si = new ilSelectInputGUI(", ".$this->lng->txt("mcst_target").": ", "target_purpose"); $si->setOptions(array("Standard" => $this->lng->txt("mcst_purpose_standard"), "VideoAlternative" => $this->lng->txt("mcst_purpose_videoalternative") )); $si->setValue($p); $ilToolbar->addInputItem($si, true); $ilToolbar->addFormButton($this->lng->txt("mcst_convert"), "convertFile"); $conv_cnt++; } } */ $med = $mob->getMediaItem($p); if (is_object($med)) { if (ilFFmpeg::supportsImageExtraction($med->getFormat())) { // second include_once "./Services/Form/classes/class.ilTextInputGUI.php"; $ni = new ilTextInputGUI($this->lng->txt("mcst_second"), "sec"); $ni->setMaxLength(4); $ni->setSize(4); $ni->setValue(1); $ilToolbar->addInputItem($ni, true); $ilToolbar->addFormButton($this->lng->txt("mcst_extract_preview_image"), "extractPreviewImage"); $ilToolbar->setFormAction($ilCtrl->getFormAction($this)); } } /*if ($conv_cnt > 0) { $ilToolbar->setFormAction($ilCtrl->getFormAction($this)); }*/ } } $this->initAddCastItemForm("edit"); $this->getCastItemValues(); $tpl->setContent($this->form_gui->getHTML()); }