Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Fixture for testing the functionality of core_media_player.

Copyright: 2012 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 90 lines (3 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

media_test_plugin:: (4 methods):
  __construct()
  embed()
  get_supported_extensions()
  get_rank()


Class: media_test_plugin  - X-Ref

Media player stub for testing purposes.

__construct($num = 1, $rank = 13, $ext = array('mp3', 'flv', 'f4v', 'mp4')   X-Ref
Constructor is used for tuning the fixture.

param: int $num Number (used in output)
param: int $rank Player rank
param: array $ext Array of supported extensions

embed($urls, $name, $width, $height, $options)   X-Ref
Generates code required to embed the player.

param: array $urls URLs of media files
param: string $name Display name; '' to use default
param: int $width Optional width; 0 to use default
param: int $height Optional height; 0 to use default
param: array $options Options array
return: string HTML code for embed

get_supported_extensions()   X-Ref
Gets the list of file extensions supported by this media player.

return: array Array of strings (extension not including dot e.g. '.mp3')

get_rank()   X-Ref
Gets the ranking of this player.

return: int Rank