ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilPlayerUtil.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
4
13{
14 private static $mejs_ver = "2_14_2";
15
19 public static function getLocalMediaElementJsPath()
20 {
21 return "./libs/bower/bower_components/mediaelement/build/mediaelement-and-player.min.js";
22 }
23
27 public static function getLocalMediaElementCssPath()
28 {
29 return "./libs/bower/bower_components/mediaelement/build/mediaelementplayer.min.css";
30 }
31
35 public static function initMediaElementJs($a_tpl = null)
36 {
37 global $DIC;
38
39 $tpl = $DIC["tpl"];
40
41 if ($a_tpl == null) {
42 $a_tpl = $tpl;
43 }
44
45 foreach (self::getJsFilePaths() as $js_path) {
46 $a_tpl->addJavaScript($js_path);
47 }
48 foreach (self::getCssFilePaths() as $css_path) {
49 $a_tpl->addCss($css_path);
50 }
51 }
52
59 public static function getCssFilePaths()
60 {
61 return array(self::getLocalMediaElementCssPath());
62 }
63
70 public static function getJsFilePaths()
71 {
72 return array(self::getLocalMediaElementJsPath());
73 }
74
75
81 public static function getFlashVideoPlayerDirectory()
82 {
83 return "libs/bower/bower_components/mediaelement/build";
84 }
85
86
92 public static function getFlashVideoPlayerFilename($a_fullpath = false)
93 {
94 $file = "flashmediaelement.swf";
95 if ($a_fullpath) {
97 }
98 return $file;
99 }
100
107 public static function copyPlayerFilesToTargetDirectory($a_target_dir)
108 {
110 "./libs/bower/bower_components/mediaelement/build",
111 $a_target_dir
112 );
113 }
114}
$tpl
Definition: ilias.php:10
An exception for terminatinating execution or to throw for unit testing.
Audio/Video Player Utility.
static getLocalMediaElementJsPath()
Get local path of jQuery file.
static getFlashVideoPlayerDirectory()
Get flash video player directory.
static getFlashVideoPlayerFilename($a_fullpath=false)
Get flash video player file name.
static getJsFilePaths()
Get js file paths.
static getCssFilePaths()
Get css file paths.
static initMediaElementJs($a_tpl=null)
Init mediaelement.js scripts.
static getLocalMediaElementCssPath()
Get local path of jQuery file.
static copyPlayerFilesToTargetDirectory($a_target_dir)
Copy css files to target dir.
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file
global $DIC
Definition: saml.php:7