ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\examples\Player\Audio Namespace Reference

Functions

 base ()
 

description: > Base example for rendering a audio player. More...

 

Function Documentation

◆ base()

ILIAS\UI\examples\Player\Audio\base ( )


description: > Base example for rendering a audio player.

expected output: > ILIAS shows a rendered audio player colored black including a control button with the label "Transcript" underneath the audio player. On the left side you will see a Start/Stop symbol, followed by a time bar and further right a volume control. The control button will open a window with the title "Transcript" and the text from the audio file.

Clicking the Start/Stop symbol will start the player and play the audio file. Clicking the symbol again will stop the audio file.

Definition at line 35 of file base.php.

References $DIC, Vendor\Package\$f, and $renderer.

36 {
37  global $DIC;
38  $renderer = $DIC->ui()->renderer();
39  $f = $DIC->ui()->factory();
40 
41  $audio = $f->player()->audio("https://files.ilias.de/ks/ILIAS-Audio.mp3", "Erster Gesang: Pest im Lager. Zorn des Achilleus. Singe vom Ingrimm, Göttin, des Peleus-Sohnes Achilleus, vom Verfluchten, der zahllose Schmerzen schuf den Archaiern und viele kraftvolle Seelen der Helden vorwarf dem Hades...");
42 
43  return $renderer->render($audio);
44 }
$renderer
global $DIC
Definition: shib_login.php:22