Skip to content

Commit

Permalink
media_jwplayer: No XML parsing for html5 video/audio
Browse files Browse the repository at this point in the history
  • Loading branch information
kabalin committed Aug 24, 2018
1 parent 551136a commit b49aa41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion classes/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ public function embed($urls, $name, $width, $height, $options) {
$playerid = 'media_jwplayer_media_' . html_writer::random_id();

// Create attribute options if we don't already have them.
if (empty($options['htmlattributes']) && !empty($options[core_media_manager::OPTION_ORIGINAL_TEXT])) {
if (empty($options['htmlattributes']) && !empty($options[core_media_manager::OPTION_ORIGINAL_TEXT])
&& !preg_match('/<(video|audio)/', $options[core_media_manager::OPTION_ORIGINAL_TEXT])) {
$xml = new SimpleXMLElement($options[core_media_manager::OPTION_ORIGINAL_TEXT]);
foreach ($xml->attributes() as $attrib => $atval) {
$options['htmlattributes'][$attrib] = $atval;
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2018072600; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2018082400; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2018051700; // Requires Moodle 3.5
$plugin->component = 'media_jwplayer'; // Full name of the plugin (used for diagnostics).
$plugin->maturity = MATURITY_STABLE;
$plugin->release = '7-0.2 for Moodle 3.2+, JW7 CDN 7.12.13)';
$plugin->release = '7-0.3 for Moodle 3.5+, JW7 CDN 7.12.13)';

0 comments on commit b49aa41

Please sign in to comment.