ILIAS  release_8 Revision v8.24
ilPlayerUtil Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilPlayerUtil:

Static Public Member Functions

static getLocalMediaElementJsPath ()
 
static getLocalMediaElementCssPath ()
 Get local path of jQuery file. More...
 
static initMediaElementJs (ilGlobalTemplateInterface $a_tpl=null)
 Init mediaelement.js scripts. More...
 
static getCssFilePaths ()
 
static getJsFilePaths ()
 
static getFlashVideoPlayerDirectory ()
 
static getFlashVideoPlayerFilename (bool $a_fullpath=false)
 
static copyPlayerFilesToTargetDirectory (string $a_target_dir)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Audio/Video Player Utility

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Deprecated:
use KS components instead

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

Member Function Documentation

◆ copyPlayerFilesToTargetDirectory()

static ilPlayerUtil::copyPlayerFilesToTargetDirectory ( string  $a_target_dir)
static

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

98 : void {
100 "./node_modules/mediaelement/build",
101 $a_target_dir
102 );
103 }
static rCopy(string $a_sdir, string $a_tdir, bool $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.

Referenced by ilCOPageHTMLExport\exportSupportScripts().

+ Here is the caller graph for this function:

◆ getCssFilePaths()

static ilPlayerUtil::getCssFilePaths ( )
static
Returns
string[]

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

68 : array
69 {
70 return array(self::getLocalMediaElementCssPath());
71 }

◆ getFlashVideoPlayerDirectory()

static ilPlayerUtil::getFlashVideoPlayerDirectory ( )
static

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

81 : string
82 {
83 return "node_modules/mediaelement/build";
84 }

Referenced by ilCOPageHTMLExport\__construct().

+ Here is the caller graph for this function:

◆ getFlashVideoPlayerFilename()

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

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

88 : string {
89 $file = "flashmediaelement.swf";
90 if ($a_fullpath) {
91 return self::getFlashVideoPlayerDirectory() . "/" . $file;
92 }
93 return $file;
94 }
static getFlashVideoPlayerDirectory()

Referenced by ilPageObjectGUI\showPage().

+ Here is the caller graph for this function:

◆ getJsFilePaths()

static ilPlayerUtil::getJsFilePaths ( )
static
Returns
string[]

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

76 : array
77 {
79 }
static getLocalMediaElementJsPath()

◆ getLocalMediaElementCssPath()

static ilPlayerUtil::getLocalMediaElementCssPath ( )
static

Get local path of jQuery file.

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

38 : string
39 {
40 return "./node_modules/mediaelement/build/mediaelementplayer.min.css";
41 }

◆ getLocalMediaElementJsPath()

static ilPlayerUtil::getLocalMediaElementJsPath ( )
static

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

27 : array
28 {
29 return [
30 "./node_modules/mediaelement/build/mediaelement-and-player.min.js",
31 "./node_modules/mediaelement/build/renderers/vimeo.min.js"
32 ];
33 }

◆ initMediaElementJs()

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

Init mediaelement.js scripts.

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

48 : void {
49 global $DIC;
50
51 $tpl = $DIC["tpl"];
52
53 if ($a_tpl == null) {
54 $a_tpl = $tpl;
55 }
56
57 foreach (self::getJsFilePaths() as $js_path) {
58 $a_tpl->addJavaScript($js_path);
59 }
60 foreach (self::getCssFilePaths() as $css_path) {
61 $a_tpl->addCss($css_path);
62 }
63 }
global $DIC
Definition: feed.php:28
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41

References $tpl.

Referenced by ILIAS\Notifications\ilNotificationOSDGUI\populatePage(), and ilPageObjectGUI\showPage().

+ Here is the caller graph for this function:

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