ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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...
 

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 105 of file class.ilPlayerUtil.php.

References ilUtil\rCopy().

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

106  {
108  "./libs/bower/bower_components/mediaelement/build",
109  $a_target_dir
110  );
111  }
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 57 of file class.ilPlayerUtil.php.

Referenced by ilCOPageHTMLExport\getPreparedMainTemplate().

58  {
59  return array(self::getLocalMediaElementCssPath());
60  }
+ Here is the caller graph for this function:

◆ getFlashVideoPlayerDirectory()

static ilPlayerUtil::getFlashVideoPlayerDirectory ( )
static

Get flash video player directory.

Returns

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

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

80  {
81  return "libs/bower/bower_components/mediaelement/build";
82  }
+ 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 90 of file class.ilPlayerUtil.php.

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

91  {
92  $file = "flashmediaelement.swf";
93  if ($a_fullpath) {
94  return self::getFlashVideoPlayerDirectory() . "/" . $file;
95  }
96  return $file;
97  }
+ Here is the caller graph for this function:

◆ getJsFilePaths()

static ilPlayerUtil::getJsFilePaths ( )
static

Get js file paths.

Parameters

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

Referenced by ilCOPageHTMLExport\getPreparedMainTemplate().

69  {
70  return array(self::getLocalMediaElementJsPath());
71  }
+ Here is the caller graph for this function:

◆ getLocalMediaElementCssPath()

static ilPlayerUtil::getLocalMediaElementCssPath ( )
static

Get local path of jQuery file.

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

Referenced by ilObjContentObject\getSupplyingExportFiles().

26  {
27  return "./libs/bower/bower_components/mediaelement/build/mediaelementplayer.min.css";
28  }
+ Here is the caller graph for this function:

◆ getLocalMediaElementJsPath()

static ilPlayerUtil::getLocalMediaElementJsPath ( )
static

Get local path of jQuery file.

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

Referenced by ilObjContentObject\getSupplyingExportFiles().

18  {
19  return "./libs/bower/bower_components/mediaelement/build/mediaelement-and-player.min.js";
20  }
+ Here is the caller graph for this function:

◆ initMediaElementJs()

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

Init mediaelement.js scripts.

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

References $DIC, and $tpl.

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

34  {
35  global $DIC;
36 
37  $tpl = $DIC["tpl"];
38 
39  if ($a_tpl == null) {
40  $a_tpl = $tpl;
41  }
42 
43  foreach (self::getJsFilePaths() as $js_path) {
44  $a_tpl->addJavaScript($js_path);
45  }
46  foreach (self::getCssFilePaths() as $css_path) {
47  $a_tpl->addCss($css_path);
48  }
49  }
global $DIC
Definition: saml.php:7
$tpl
Definition: ilias.php:10
+ Here is the caller graph for this function:

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