ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPlayerUtil Class Reference

Audio/Video Player Utility. More...

+ Collaboration diagram for ilPlayerUtil:

Public Member Functions

 getLocalMediaElementJsPath ()
 Get local path of jQuery file. More...
 
 getLocalMediaElementCssPath ()
 Get local path of jQuery file. More...
 
 copyPlayerFilesToTargetDirectory ($a_target_dir)
 Copy css files to target dir. More...
 

Static Public Member Functions

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 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()

ilPlayerUtil::copyPlayerFilesToTargetDirectory (   $a_target_dir)

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.

Referenced by ilCOPageHTMLExport\getPreparedMainTemplate().

61  {
62  return array(self::getLocalMediaElementCssPath());
63  }
+ 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  }
print $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.

Referenced by ilCOPageHTMLExport\getPreparedMainTemplate().

72  {
73  return array(self::getLocalMediaElementJsPath());
74  }
+ Here is the caller graph for this function:

◆ getLocalMediaElementCssPath()

ilPlayerUtil::getLocalMediaElementCssPath ( )

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()

ilPlayerUtil::getLocalMediaElementJsPath ( )

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 ilMainMenuGUI\getLanguageSelection(), ilMediaPlayerGUI\getMp3PlayerHtml(), ilObjMediaObjectGUI\includePresentationJS(), 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: