See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401]
Media plugin filtering This filter will replace any links to a media file with a media plugin that plays that media inline
Copyright: | 2004 onwards Martin Dougiamas {@link http://moodle.com} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 235 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
filter_mediaplugin:: (5 methods):
setup()
filter()
callback()
embed_alternatives()
process_media_tag()
Class: filter_mediaplugin - X-Ref
Automatic media embedding filter class.setup($page, $context) X-Ref |
Setup page with filter requirements and other prepare stuff. param: moodle_page $page The page we are going to add requirements to. param: context $context The context which contents are going to be filtered. |
filter($text, array $options = array() X-Ref |
No description |
callback(array $matches) X-Ref |
Replace link with embedded content, if supported. param: array $matches return: string |
embed_alternatives($urls, $name, $width, $height, $options) X-Ref |
Renders media files (audio or video) using suitable embedded player. Wrapper for {@link core_media_manager::embed_alternatives()} param: array $urls Array of moodle_url to media files param: string $name Optional user-readable name to display in download link param: int $width Width in pixels (optional) param: int $height Height in pixels (optional) param: array $options Array of key/value pairs return: string HTML content of embed |
process_media_tag($fulltext) X-Ref |
Replaces <video> or <audio> tag with processed contents param: string $fulltext complete HTML snipped "<video ...>...</video>" or "<audio ...>....</audio>" return: string |