ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilMediaPlayerGUI Class Reference

User interface for media player. More...

+ Collaboration diagram for ilMediaPlayerGUI:

Public Member Functions

 __construct ($a_id="", $a_event_callback_url="")
 
 setFile ($a_file)
 Set File. More...
 
 getFile ()
 Get File. More...
 
 setAlternativeVideoFile ($a_val)
 Set alternative video file. More...
 
 getAlternativeVideoFile ()
 Get alternative video file. More...
 
 setAlternativeVideoMimeType ($a_val)
 Set alternative video mime type. More...
 
 getAlternativeVideoMimeType ()
 Get alternative video mime type. More...
 
 setDisplayHeight ($dHeight)
 set display height More...
 
 getDisplayHeight ()
 return display height of player. More...
 
 setDisplayWidth ($a_val)
 Set display width. More...
 
 getDisplayWidth ()
 Get display width. More...
 
 setMimeType ($value)
 
 setVideoPreviewPic ($a_val, $a_alt="")
 Set video preview picture. More...
 
 getVideoPreviewPic ()
 Get video preview picture. More...
 
 setTitle ($a_val)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setDescription ($a_val)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setForceAudioPreview ($a_val)
 Set force audio preview. More...
 
 getForceAudioPreview ()
 Get force audio preview. More...
 
 setDownloadLink ($a_val)
 Set download link. More...
 
 getDownloadLink ()
 Get download link. More...
 
 getMp3PlayerHtml ($a_preview=false)
 Get Html for MP3 Player. More...
 
 getPreviewHtml ()
 Get preview html. More...
 
 getMediaPlayerHtml ()
 Get HTML (no preview) for media player integration. More...
 

Static Public Member Functions

static initJavascript ($a_tpl=null)
 Init Javascript. More...
 

Protected Attributes

 $tpl
 
 $lng
 
 $file
 
 $displayHeight = ""
 
 $displayWidth = ""
 
 $mimeType
 
 $current_nr
 
 $title
 
 $description
 
 $event_callback_url = ""
 
 $download_link = ""
 

Static Protected Attributes

static $nr = 1
 
static $lightbox_initialized = false
 

Detailed Description

User interface for media player.

Wraps flash mp3 player and similar tools.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 13 of file class.ilMediaPlayerGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilMediaPlayerGUI::__construct (   $a_id = "",
  $a_event_callback_url = "" 
)

Definition at line 37 of file class.ilMediaPlayerGUI.php.

38 {
39 global $DIC;
40
41 $this->tpl = $DIC["tpl"];
42 $this->lng = $DIC->language();
43 $this->id = $a_id;
44 $this->event_callback_url = $a_event_callback_url;
45 $this->current_nr = self::$nr;
46 self::$nr++;
47 }
$DIC
Definition: xapitoken.php:46

References $DIC, and $nr.

Member Function Documentation

◆ getAlternativeVideoFile()

ilMediaPlayerGUI::getAlternativeVideoFile ( )

Get alternative video file.

Returns
string alternative video file

Definition at line 84 of file class.ilMediaPlayerGUI.php.

85 {
86 return $this->alt_video_file;
87 }

Referenced by getMp3PlayerHtml().

+ Here is the caller graph for this function:

◆ getAlternativeVideoMimeType()

ilMediaPlayerGUI::getAlternativeVideoMimeType ( )

Get alternative video mime type.

Returns
string alternative video mime type

Definition at line 104 of file class.ilMediaPlayerGUI.php.

105 {
106 return $this->alt_video_mime;
107 }

Referenced by getMp3PlayerHtml().

+ Here is the caller graph for this function:

◆ getDescription()

ilMediaPlayerGUI::getDescription ( )

Get description.

Returns
string description

Definition at line 210 of file class.ilMediaPlayerGUI.php.

211 {
212 return $this->description;
213 }

References $description.

Referenced by getMp3PlayerHtml().

+ Here is the caller graph for this function:

◆ getDisplayHeight()

ilMediaPlayerGUI::getDisplayHeight ( )

return display height of player.

Returns
int

Definition at line 124 of file class.ilMediaPlayerGUI.php.

References $displayHeight.

Referenced by getMp3PlayerHtml().

+ Here is the caller graph for this function:

◆ getDisplayWidth()

ilMediaPlayerGUI::getDisplayWidth ( )

Get display width.

Returns
string display width

Definition at line 144 of file class.ilMediaPlayerGUI.php.

145 {
146 return $this->displayWidth;
147 }

References $displayWidth.

Referenced by getMp3PlayerHtml().

+ Here is the caller graph for this function:

◆ getDownloadLink()

ilMediaPlayerGUI::getDownloadLink ( )

Get download link.

Returns
string download link

Definition at line 250 of file class.ilMediaPlayerGUI.php.

References $download_link.

Referenced by getMp3PlayerHtml().

+ Here is the caller graph for this function:

◆ getFile()

ilMediaPlayerGUI::getFile ( )

Get File.

Returns
string File

Definition at line 64 of file class.ilMediaPlayerGUI.php.

References $file.

Referenced by getMp3PlayerHtml().

+ Here is the caller graph for this function:

◆ getForceAudioPreview()

ilMediaPlayerGUI::getForceAudioPreview ( )

Get force audio preview.

Returns
boolean force audio preview picture

Definition at line 230 of file class.ilMediaPlayerGUI.php.

231 {
232 return $this->force_audio_preview;
233 }

Referenced by getMp3PlayerHtml().

+ Here is the caller graph for this function:

◆ getMediaPlayerHtml()

ilMediaPlayerGUI::getMediaPlayerHtml ( )

Get HTML (no preview) for media player integration.

Returns
string html

Definition at line 564 of file class.ilMediaPlayerGUI.php.

565 {
566 return $this->getMp3PlayerHtml(false);
567 }
getMp3PlayerHtml($a_preview=false)
Get Html for MP3 Player.

References getMp3PlayerHtml().

+ Here is the call graph for this function:

◆ getMp3PlayerHtml()

ilMediaPlayerGUI::getMp3PlayerHtml (   $a_preview = false)

Get Html for MP3 Player.

Definition at line 282 of file class.ilMediaPlayerGUI.php.

283 {
286
288
289 if (!self::$lightbox_initialized && $a_preview) {
290 include_once("./Services/UIComponent/Lightbox/classes/class.ilLightboxGUI.php");
291 $lb = new ilLightboxGUI("media_lightbox");
292 $lb->setWidth("660px");
293 $lb->addLightbox();
294 self::$lightbox_initialized = true;
295 }
296
297 require_once 'Services/MediaObjects/classes/class.ilObjMediaObject.php';
298 include_once("./Services/MediaObjects/classes/class.ilExternalMediaAnalyzer.php");
299
300 // youtube
303 /*
304 $html = '<object width="320" height="240">'.
305 '<param name="movie" value="http://www.youtube.com/v/'.$p["v"].'?fs=1">'.
306 '</param><param name="allowFullScreen" value="true"></param>'.
307 '<param name="allowscriptaccess" value="always">'.
308 '</param><embed src="http://www.youtube.com/v/'.$p["v"].'?fs=1" '.
309 'type="application/x-shockwave-flash" allowscriptaccess="always" '.
310 'allowfullscreen="true" width="320" height="240"></embed></object>';
311 return $html;*/
312 $mp_tpl = new ilTemplate("tpl.flv_player.html", true, true, "Services/MediaObjects");
313 if ($a_preview) {
314 if ($this->getDownloadLink() != "") {
315 $mp_tpl->setCurrentBlock("ytdownload");
316 $mp_tpl->setVariable("TXT_DOWNLOAD", $lng->txt("download"));
317 $mp_tpl->setVariable("HREF_DOWNLOAD", $this->getDownloadLink());
318 $mp_tpl->parseCurrentBlock();
319 }
320
321 $mp_tpl->setCurrentBlock("ytpreview");
322 if ($this->getVideoPreviewPic() != "") {
323 $mp_tpl->setVariable("IMG_SRC", $this->getVideoPreviewPic());
324 } else {
325 $mp_tpl->setVariable("IMG_SRC", ilUtil::getImagePath("mcst_preview.svg"));
326 }
327 $height = $this->getDisplayHeight();
328 $width = $this->getDisplayWidth();
329 $mp_tpl->setVariable("DISPLAY_HEIGHT", $height);
330 $mp_tpl->setVariable("DISPLAY_WIDTH", $width);
331 $mp_tpl->setVariable("IMG_ALT", $this->video_preview_pic_alt);
332 $mp_tpl->setVariable("PTITLE", $this->getTitle());
333 $mp_tpl->parseCurrentBlock();
334 }
335 $mp_tpl->setCurrentBlock("youtube");
336 if ($a_preview) {
337 $mp_tpl->setVariable("CLASS", "ilNoDisplay");
338 }
339 $mp_tpl->setVariable("PV", $p["v"]);
340 $mp_tpl->setVariable("PLAYER_NR", $this->id . "_" . $this->current_nr);
341 $mp_tpl->setVariable("TXT_PLAY", $lng->txt("mob_play"));
342 $mp_tpl->setVariable("TITLE", $this->getTitle());
343 $mp_tpl->setVariable("DESCRIPTION", $this->getDescription());
344 include_once("./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
345 if ($a_preview) {
346 $mp_tpl->setVariable("CLOSE", ilGlyphGUI::get(ilGlyphGUI::CLOSE));
347 }
348 $mp_tpl->parseCurrentBlock();
349 return $mp_tpl->get();
350 }
351
352 // vimeo
355 $html = '<iframe src="//player.vimeo.com/video/' . $p["id"] . '" width="320" height="240" ' .
356 'frameborder="0"></iframe>';
357
358 return $html;
359 }
360
361 $mimeType = $this->mimeType == "" ? ilObjMediaObject::getMimeType(basename($this->getFile())) : $this->mimeType;
362 include_once("./Services/MediaObjects/classes/class.ilPlayerUtil.php");
363
364 // video tag
365 if (in_array($mimeType, array("video/mp4", "video/m4v", "video/rtmp",
366 "video/x-flv", "video/webm", "video/youtube", "video/vimeo", "video/ogg"))) {
367 if ($mimeType == "video/quicktime") {
368 $mimeType = "video/mov";
369 }
370
371 $mp_tpl = new ilTemplate("tpl.flv_player.html", true, true, "Services/MediaObjects");
372
373 // preview
374 if ($a_preview) {
375 if ($this->getDownloadLink() != "") {
376 $mp_tpl->setCurrentBlock("download");
377 $mp_tpl->setVariable("TXT_DOWNLOAD", $lng->txt("download"));
378 $mp_tpl->setVariable("HREF_DOWNLOAD", $this->getDownloadLink());
379 $mp_tpl->parseCurrentBlock();
380 }
381
382 $mp_tpl->setCurrentBlock("preview");
383 if ($this->getVideoPreviewPic() != "") {
384 $mp_tpl->setVariable("IMG_SRC", $this->getVideoPreviewPic());
385 } else {
386 $mp_tpl->setVariable("IMG_SRC", ilUtil::getImagePath("mcst_preview.svg"));
387 }
388 $mp_tpl->setVariable("IMG_ALT", $this->video_preview_pic_alt);
389 $mp_tpl->setVariable("PTITLE", $this->getTitle());
390 $mp_tpl->parseCurrentBlock();
391 }
392
393 // sources
394 $mp_tpl->setCurrentBlock("source");
395 $mp_tpl->setVariable("FILE", $this->getFile());
396 $mp_tpl->setVariable("MIME", $mimeType);
397 $mp_tpl->parseCurrentBlock();
398
399 if (in_array($this->getAlternativeVideoMimeType(), array("video/mp4", "video/webm"))) {
400 $mp_tpl->setCurrentBlock("source");
401 $mp_tpl->setVariable("FILE", $this->getAlternativeVideoFile());
402 $mp_tpl->setVariable("MIME", $this->getAlternativeVideoMimeType());
403 $mp_tpl->parseCurrentBlock();
404 }
405
406 $mp_tpl->setCurrentBlock("mejs_video");
407
408 if ($a_preview) {
409 $mp_tpl->setVariable("WRAP_CLASS", "ilNoDisplay");
410 $mp_tpl->setVariable("CLASS", "mejs__player ilNoDisplay");
411 } else {
412 //$mp_tpl->setVariable("CLASS", "mejs__player");
413 }
414
415 $mp_tpl->setVariable("PLAYER_NR", $this->id . "_" . $this->current_nr);
416 $mp_tpl->setVariable("TXT_PLAY", $lng->txt("mob_play"));
417 $mp_tpl->setVariable("EVENT_URL", $this->event_callback_url);
418 $height = $this->getDisplayHeight();
419 $width = $this->getDisplayWidth();
420 if (is_int(strpos($mimeType, "audio/mpeg"))) {
421 //$height = "30px";
422 }
423
424 if ($height != "") {
425 $style = "height: ".$height."; ";
426 }
427 if ($width != "") {
428 $style.= "width: ".$width."; ";
429 }
430 if ($style != "") {
431 $mp_tpl->setVariable("STYLE", "style='$style'");
432 }
433 //$mp_tpl->setVariable("DISPLAY_HEIGHT", $height);
434 //$mp_tpl->setVariable("DISPLAY_WIDTH", $width);
435 $mp_tpl->setVariable("PREVIEW_PIC", $this->getVideoPreviewPic());
436 $mp_tpl->setVariable("SWF_FILE", ilPlayerUtil::getFlashVideoPlayerFilename(true));
437 $mp_tpl->setVariable("FFILE", $this->getFile());
438 $mp_tpl->setVariable("TITLE", $this->getTitle());
439 $mp_tpl->setVariable("DESCRIPTION", $this->getDescription());
440 include_once("./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
441 if ($a_preview) {
442 $mp_tpl->setVariable("CLOSE", ilGlyphGUI::get(ilGlyphGUI::CLOSE));
443 }
444 $mp_tpl->parseCurrentBlock();
445 $r = $mp_tpl->get();
446
447 if (!$a_preview) {
448 $tpl->addOnLoadCode("new MediaElementPlayer('player_" . $this->id . "_" . $this->current_nr . "');");
449 }
450
451 //echo htmlentities($r); exit;
452 return $r;
453 }
454
455 // audio/mpeg
456 if (is_int(strpos($mimeType, "audio/mpeg")) ||
457 in_array($mimeType, array("application/ogg", "audio/ogg"))) {
459 $mp_tpl = new ilTemplate("tpl.flv_player.html", true, true, "Services/MediaObjects");
460 $preview_output = false;
461 if ($this->getVideoPreviewPic() != "" || $this->getForceAudioPreview()) {
462 if ($this->getDownloadLink() != "") {
463 $mp_tpl->setCurrentBlock("adownload");
464 $mp_tpl->setVariable("TXT_DOWNLOAD", $lng->txt("download"));
465 $mp_tpl->setVariable("HREF_DOWNLOAD", $this->getDownloadLink());
466 $mp_tpl->parseCurrentBlock();
467 }
468
469 $mp_tpl->setCurrentBlock("apreview");
470 if ($this->getVideoPreviewPic() != "") {
471 $mp_tpl->setVariable("IMG_SRC", $this->getVideoPreviewPic());
472 } else {
473 $mp_tpl->setVariable("IMG_SRC", ilUtil::getImagePath("mcst_preview.svg"));
474 }
475 $mp_tpl->setVariable("PTITLE", $this->getTitle());
476 $mp_tpl->parseCurrentBlock();
477 $preview_output = true;
478 }
479 $mp_tpl->setCurrentBlock("audio");
480 if ($preview_output) {
481 $mp_tpl->setVariable("ASTYLE", "margin-top:-40px");
482 }
483 $mp_tpl->setVariable("AFILE", $this->getFile());
484 $mp_tpl->setVariable("APLAYER_NR", $this->id . "_" . $this->current_nr);
485 $mp_tpl->setVariable("AEVENT_URL", $this->event_callback_url);
486 $mp_tpl->setVariable("AHEIGHT", "40");
487 $mp_tpl->setVariable("AWIDTH", "320");
488 $mp_tpl->parseCurrentBlock();
489 return $mp_tpl->get();
490 }
491
492 // images
493 if (is_int(strpos($mimeType, "image/"))) {
494 $mp_tpl = new ilTemplate("tpl.flv_player.html", true, true, "Services/MediaObjects");
495
496 if ($this->getDownloadLink() != "") {
497 $mp_tpl->setCurrentBlock("idownload");
498 $mp_tpl->setVariable("TXT_DOWNLOAD", $lng->txt("download"));
499 $mp_tpl->setVariable("HREF_DOWNLOAD", $this->getDownloadLink());
500 $mp_tpl->parseCurrentBlock();
501 }
502
503 $mp_tpl->setCurrentBlock("ipreview");
504 if ($this->getVideoPreviewPic() != "") {
505 $mp_tpl->setVariable("IMG_SRC", $this->getVideoPreviewPic());
506 } else {
507 $mp_tpl->setVariable("IMG_SRC", $this->getFile());
508 }
509 $mp_tpl->setVariable("PTITLE", $this->getTitle());
510 $mp_tpl->parseCurrentBlock();
511
512 $mp_tpl->setCurrentBlock("image");
513 $mp_tpl->setVariable("IFILE", $this->getFile());
514 $mp_tpl->setVariable("IPLAYER_NR", $this->id . "_" . $this->current_nr);
515 $mp_tpl->setVariable("ITITLE", $this->getTitle());
516 $mp_tpl->setVariable("IDESCRIPTION", $this->getDescription());
517 include_once("./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
518 $mp_tpl->setVariable("ICLOSE", ilGlyphGUI::get(ilGlyphGUI::CLOSE));
519
520 if ($this->event_callback_url) {
521 $mp_tpl->setVariable("IMG_CALLBACK_URL", $this->event_callback_url);
522 $mp_tpl->setVariable("IMG_CALLBACK_PLAYER_NR", $this->id . "_" . $this->current_nr);
523 }
524
525 $mp_tpl->setVariable("IHEIGHT", $this->getDisplayHeight());
526 $mp_tpl->setVariable("IWIDTH", $this->getDisplayWidth());
527 $mp_tpl->parseCurrentBlock();
528
529 return $mp_tpl->get();
530 }
531
532 // fallback, no preview mode
533 $mimeType = $this->mimeType == "" ? ilObjMediaObject::getMimeType(basename($this->getFile())) : $this->mimeType;
534 if (strpos($mimeType, "flv") === false
535 && strpos($mimeType, "audio/mpeg") === false
536 && strpos($mimeType, "image/png") === false
537 && strpos($mimeType, "image/gif") === false) {
538 $html = '<embed src="' . $this->getFile() . '" ' .
539 'type="' . $mimeType . '" ' .
540 'ShowControls="1" ' .
541 'autoplay="false" autostart="false" ' .
542 'width="320" height="240" scale="aspect" ></embed>';
543 return $html;
544 }
545
546 return;
547 }
static extractYouTubeParameters($a_location)
Extract YouTube Parameter.
static isVimeo($a_location)
Identify Vimeo links.
static extractVimeoParameters($a_location)
Extract Vimeo Parameter.
static isYouTube($a_location)
Identify YouTube links.
static get($a_glyph, $a_text="")
Get glyph html.
Lighbox handling.
getForceAudioPreview()
Get force audio preview.
getDisplayWidth()
Get display width.
static initJavascript($a_tpl=null)
Init Javascript.
getAlternativeVideoFile()
Get alternative video file.
getDescription()
Get description.
getAlternativeVideoMimeType()
Get alternative video mime type.
getVideoPreviewPic()
Get video preview picture.
getDisplayHeight()
return display height of player.
getDownloadLink()
Get download link.
static getMimeType($a_file, $a_external=null)
get mime type for file
static getFlashVideoPlayerFilename($a_fullpath=false)
Get flash video player file name.
static initMediaElementJs($a_tpl=null)
Init mediaelement.js scripts.
special template class to simplify handling of ITX/PEAR
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $lng, $mimeType, $tpl, ilGlyphGUI\CLOSE, ilExternalMediaAnalyzer\extractVimeoParameters(), ilExternalMediaAnalyzer\extractYouTubeParameters(), ilGlyphGUI\get(), getAlternativeVideoFile(), getAlternativeVideoMimeType(), getDescription(), getDisplayHeight(), getDisplayWidth(), getDownloadLink(), getFile(), ilPlayerUtil\getFlashVideoPlayerFilename(), getForceAudioPreview(), ilUtil\getImagePath(), ilObjMediaObject\getMimeType(), getTitle(), getVideoPreviewPic(), initJavascript(), ilPlayerUtil\initMediaElementJs(), ilExternalMediaAnalyzer\isVimeo(), and ilExternalMediaAnalyzer\isYouTube().

Referenced by getMediaPlayerHtml(), and getPreviewHtml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPreviewHtml()

ilMediaPlayerGUI::getPreviewHtml ( )

Get preview html.

Returns
string html

Definition at line 554 of file class.ilMediaPlayerGUI.php.

555 {
556 return $this->getMp3PlayerHtml(true);
557 }

References getMp3PlayerHtml().

+ Here is the call graph for this function:

◆ getTitle()

ilMediaPlayerGUI::getTitle ( )

Get Title.

Returns
string title

Definition at line 190 of file class.ilMediaPlayerGUI.php.

191 {
192 return $this->title;
193 }

References $title.

Referenced by getMp3PlayerHtml().

+ Here is the caller graph for this function:

◆ getVideoPreviewPic()

ilMediaPlayerGUI::getVideoPreviewPic ( )

Get video preview picture.

Returns
string video preview picture

Definition at line 170 of file class.ilMediaPlayerGUI.php.

171 {
172 return $this->video_preview_pic;
173 }

Referenced by getMp3PlayerHtml().

+ Here is the caller graph for this function:

◆ initJavascript()

static ilMediaPlayerGUI::initJavascript (   $a_tpl = null)
static

Init Javascript.

Parameters
null$a_tpl

Definition at line 259 of file class.ilMediaPlayerGUI.php.

260 {
261 global $DIC;
262
263 $tpl = $DIC["tpl"];
264
265 if ($a_tpl == null) {
266 $a_tpl = $tpl;
267 }
268
269 include_once("./Services/YUI/classes/class.ilYuiUtil.php");
271
272 $a_tpl->addJavascript("./Services/MediaObjects/js/MediaObjects.js?1");
273
274 include_once("./Services/MediaObjects/classes/class.ilPlayerUtil.php");
276 }
static initConnection(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.

References $DIC, $tpl, ilYuiUtil\initConnection(), and ilPlayerUtil\initMediaElementJs().

Referenced by getMp3PlayerHtml(), and ilNewsTimelineGUI\show().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAlternativeVideoFile()

ilMediaPlayerGUI::setAlternativeVideoFile (   $a_val)

Set alternative video file.

Parameters
string$a_valalternative video file

Definition at line 74 of file class.ilMediaPlayerGUI.php.

75 {
76 $this->alt_video_file = $a_val;
77 }

◆ setAlternativeVideoMimeType()

ilMediaPlayerGUI::setAlternativeVideoMimeType (   $a_val)

Set alternative video mime type.

Parameters
string$a_valalternative video mime type

Definition at line 94 of file class.ilMediaPlayerGUI.php.

95 {
96 $this->alt_video_mime = $a_val;
97 }

◆ setDescription()

ilMediaPlayerGUI::setDescription (   $a_val)

Set description.

Parameters
string$a_valdescription

Definition at line 200 of file class.ilMediaPlayerGUI.php.

201 {
202 $this->description = $a_val;
203 }

◆ setDisplayHeight()

ilMediaPlayerGUI::setDisplayHeight (   $dHeight)

set display height

Parameters
int$dHeight

Definition at line 114 of file class.ilMediaPlayerGUI.php.

115 {
116 $this->displayHeight = $dHeight;
117 }

◆ setDisplayWidth()

ilMediaPlayerGUI::setDisplayWidth (   $a_val)

Set display width.

Parameters
string$a_valdisplay width

Definition at line 134 of file class.ilMediaPlayerGUI.php.

135 {
136 $this->displayWidth = $a_val;
137 }

◆ setDownloadLink()

ilMediaPlayerGUI::setDownloadLink (   $a_val)

Set download link.

Parameters
string$a_valdownload link

Definition at line 240 of file class.ilMediaPlayerGUI.php.

241 {
242 $this->download_link = $a_val;
243 }

◆ setFile()

ilMediaPlayerGUI::setFile (   $a_file)

Set File.

Parameters
string$a_fileFile

Definition at line 54 of file class.ilMediaPlayerGUI.php.

55 {
56 $this->file = $a_file;
57 }

◆ setForceAudioPreview()

ilMediaPlayerGUI::setForceAudioPreview (   $a_val)

Set force audio preview.

Parameters
boolean$a_valforce audio preview picture

Definition at line 220 of file class.ilMediaPlayerGUI.php.

221 {
222 $this->force_audio_preview = $a_val;
223 }

◆ setMimeType()

ilMediaPlayerGUI::setMimeType (   $value)

Definition at line 149 of file class.ilMediaPlayerGUI.php.

150 {
151 $this->mimeType = $value;
152 }

◆ setTitle()

ilMediaPlayerGUI::setTitle (   $a_val)

Set Title.

Parameters
string$a_valtitle

Definition at line 180 of file class.ilMediaPlayerGUI.php.

181 {
182 $this->title = $a_val;
183 }

◆ setVideoPreviewPic()

ilMediaPlayerGUI::setVideoPreviewPic (   $a_val,
  $a_alt = "" 
)

Set video preview picture.

Parameters
string$a_valvideo preview picture

Definition at line 159 of file class.ilMediaPlayerGUI.php.

160 {
161 $this->video_preview_pic = $a_val;
162 $this->video_preview_pic_alt = $a_alt;
163 }

Field Documentation

◆ $current_nr

ilMediaPlayerGUI::$current_nr
protected

Definition at line 31 of file class.ilMediaPlayerGUI.php.

◆ $description

ilMediaPlayerGUI::$description
protected

Definition at line 33 of file class.ilMediaPlayerGUI.php.

Referenced by getDescription().

◆ $displayHeight

ilMediaPlayerGUI::$displayHeight = ""
protected

Definition at line 26 of file class.ilMediaPlayerGUI.php.

Referenced by getDisplayHeight().

◆ $displayWidth

ilMediaPlayerGUI::$displayWidth = ""
protected

Definition at line 27 of file class.ilMediaPlayerGUI.php.

Referenced by getDisplayWidth().

◆ $download_link

ilMediaPlayerGUI::$download_link = ""
protected

Definition at line 35 of file class.ilMediaPlayerGUI.php.

Referenced by getDownloadLink().

◆ $event_callback_url

ilMediaPlayerGUI::$event_callback_url = ""
protected

Definition at line 34 of file class.ilMediaPlayerGUI.php.

◆ $file

ilMediaPlayerGUI::$file
protected

Definition at line 25 of file class.ilMediaPlayerGUI.php.

Referenced by getFile().

◆ $lightbox_initialized

ilMediaPlayerGUI::$lightbox_initialized = false
staticprotected

Definition at line 30 of file class.ilMediaPlayerGUI.php.

◆ $lng

ilMediaPlayerGUI::$lng
protected

Definition at line 23 of file class.ilMediaPlayerGUI.php.

Referenced by getMp3PlayerHtml().

◆ $mimeType

ilMediaPlayerGUI::$mimeType
protected

Definition at line 28 of file class.ilMediaPlayerGUI.php.

Referenced by getMp3PlayerHtml().

◆ $nr

ilMediaPlayerGUI::$nr = 1
staticprotected

Definition at line 29 of file class.ilMediaPlayerGUI.php.

Referenced by __construct().

◆ $title

ilMediaPlayerGUI::$title
protected

Definition at line 32 of file class.ilMediaPlayerGUI.php.

Referenced by getTitle().

◆ $tpl

ilMediaPlayerGUI::$tpl
protected

Definition at line 18 of file class.ilMediaPlayerGUI.php.

Referenced by getMp3PlayerHtml(), and initJavascript().


The documentation for this class was generated from the following file: