ILIAS  release_7 Revision v7.30-3-g800a261c036
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

return

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

109 {
111 "./node_modules/mediaelement/build",
112 $a_target_dir
113 );
114 }
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.

References ilUtil\rCopy().

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

+ 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

return

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

58 {
59 return array(self::getLocalMediaElementCssPath());
60 }

Referenced by ilPCMediaObject\getCssFiles().

+ 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.

83 {
84 return "node_modules/mediaelement/build";
85 }

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

+ 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.

94 {
95 $file = "flashmediaelement.swf";
96 if ($a_fullpath) {
97 return self::getFlashVideoPlayerDirectory() . "/" . $file;
98 }
99 return $file;
100 }
static getFlashVideoPlayerDirectory()
Get flash video player directory.

References getFlashVideoPlayerDirectory().

Referenced by ilPageObjectGUI\showPage().

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

◆ getJsFilePaths()

static ilPlayerUtil::getJsFilePaths ( )
static

Get js file paths.

Parameters

return

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

69 {
70 return array(
71 self::getLocalMediaElementJsPath(),
72 "./Services/MediaObjects/js/MediaElementHelper.js"
73 );
74 }

Referenced by ilPCMediaObject\getJavascriptFiles(), and ilCOPageHTMLExport\getPreparedMainTemplate().

+ 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.

26 {
27 return "./node_modules/mediaelement/build/mediaelementplayer.min.css";
28 }

◆ getLocalMediaElementJsPath()

static ilPlayerUtil::getLocalMediaElementJsPath ( )
static

Get local path of jQuery file.

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

18 {
19 return "./node_modules/mediaelement/build/mediaelement-and-player.min.js";
20 }

◆ initMediaElementJs()

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

Init mediaelement.js scripts.

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

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: goto.php:24
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41

References $DIC, and $tpl.

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

+ Here is the caller graph for this function:

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