ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilPlayerUtil Class Reference

Audio/Video Player Utility. More...

+ Collaboration diagram for ilPlayerUtil:

Static Public Member Functions

static getLocalMediaElementJsPath ()
 Get local path of jQuery file. More...
 
static getLocalMediaElementCssPath ()
 Get local path of jQuery file. More...
 
static initMediaElementJs ($a_tpl=null)
 Init mediaelement.js scripts. More...
 
static getCssFilePaths ()
 Get css file paths. More...
 
static getJsFilePaths ()
 Get js file paths. More...
 
static getFlashVideoPlayerDirectory ()
 Get flash video player directory. More...
 
static getFlashVideoPlayerFilename ($a_fullpath=false)
 Get flash video player file name. More...
 
static copyPlayerFilesToTargetDirectory ($a_target_dir)
 Copy css files to target dir. More...
 

Static Private Attributes

static $mejs_ver = "2_14_2"
 

Detailed Description

Audio/Video Player Utility.

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

Definition at line 12 of file class.ilPlayerUtil.php.

Member Function Documentation

◆ copyPlayerFilesToTargetDirectory()

static ilPlayerUtil::copyPlayerFilesToTargetDirectory (   $a_target_dir)
static

Copy css files to target dir.

Parameters

Definition at line 109 of file class.ilPlayerUtil.php.

References ilUtil\rCopy().

Referenced by ilObjContentObject\exportHTML(), ilCOPageHTMLExport\exportSupportScripts(), and ilObjSCORM2004LearningModule\prepareHTMLExporter().

110  {
111  ilUtil::rCopy("./Services/MediaObjects/media_element_".self::$mejs_ver,
112  $a_target_dir);
113  }
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCssFilePaths()

static ilPlayerUtil::getCssFilePaths ( )
static

Get css file paths.

Parameters

Definition at line 60 of file class.ilPlayerUtil.php.

References array.

Referenced by ilCOPageHTMLExport\getPreparedMainTemplate().

61  {
62  return array(self::getLocalMediaElementCssPath());
63  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ getFlashVideoPlayerDirectory()

static ilPlayerUtil::getFlashVideoPlayerDirectory ( )
static

Get flash video player directory.

Returns

Definition at line 82 of file class.ilPlayerUtil.php.

Referenced by ilCOPageHTMLExport\__construct(), ilObjContentObject\exportHTML(), ilObjMediaObject\exportMediaFullscreen(), and ilObjSCORM2004LearningModule\prepareHTMLExporter().

83  {
84  return "Services/MediaObjects/media_element_2_14_2";
85  }
+ Here is the caller graph for this function:

◆ getFlashVideoPlayerFilename()

static ilPlayerUtil::getFlashVideoPlayerFilename (   $a_fullpath = false)
static

Get flash video player file name.

Returns

Definition at line 93 of file class.ilPlayerUtil.php.

References $file.

Referenced by ilMediaPlayerGUI\getMp3PlayerHtml(), and ilPageObjectGUI\showPage().

94  {
95  $file = "flashmediaelement.swf";
96  if ($a_fullpath)
97  {
98  return self::getFlashVideoPlayerDirectory()."/".$file;
99  }
100  return $file;
101  }
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
+ Here is the caller graph for this function:

◆ getJsFilePaths()

static ilPlayerUtil::getJsFilePaths ( )
static

Get js file paths.

Parameters

Definition at line 71 of file class.ilPlayerUtil.php.

References array.

Referenced by ilCOPageHTMLExport\getPreparedMainTemplate().

72  {
73  return array(self::getLocalMediaElementJsPath());
74  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ getLocalMediaElementCssPath()

static ilPlayerUtil::getLocalMediaElementCssPath ( )
static

Get local path of jQuery file.

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

Referenced by ilObjContentObject\getSupplyingExportFiles().

28  {
29  return "./Services/MediaObjects/media_element_".self::$mejs_ver."/mediaelementplayer.min.css";
30  }
+ Here is the caller graph for this function:

◆ getLocalMediaElementJsPath()

static ilPlayerUtil::getLocalMediaElementJsPath ( )
static

Get local path of jQuery file.

Definition at line 19 of file class.ilPlayerUtil.php.

Referenced by ilObjContentObject\getSupplyingExportFiles().

20  {
21  return "./Services/MediaObjects/media_element_".self::$mejs_ver."/mediaelement-and-player.js";
22  }
+ Here is the caller graph for this function:

◆ initMediaElementJs()

static ilPlayerUtil::initMediaElementJs (   $a_tpl = null)
static

Init mediaelement.js scripts.

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

References $tpl.

Referenced by ilMediaPlayerGUI\getMp3PlayerHtml(), ilObjMediaObjectGUI\includePresentationJS(), ilMediaPlayerGUI\initJavascript(), ilNotificationOSDGUI\render(), and ilPageObjectGUI\showPage().

36  {
37  global $tpl;
38 
39  if ($a_tpl == null)
40  {
41  $a_tpl = $tpl;
42  }
43 
44  foreach (self::getJsFilePaths() as $js_path)
45  {
46  $a_tpl->addJavaScript($js_path);
47  }
48  foreach (self::getCssFilePaths() as $css_path)
49  {
50  $a_tpl->addCss($css_path);
51  }
52  }
global $tpl
Definition: ilias.php:8
+ Here is the caller graph for this function:

Field Documentation

◆ $mejs_ver

ilPlayerUtil::$mejs_ver = "2_14_2"
staticprivate

Definition at line 14 of file class.ilPlayerUtil.php.


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