mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-57101 media_videojs: Dynamic loader works on self-matching nodes
This commit is contained in:
parent
36e6789b27
commit
b52c562a8c
2
media/player/videojs/amd/build/loader.min.js
vendored
2
media/player/videojs/amd/build/loader.min.js
vendored
@ -1 +1 @@
|
||||
define(["jquery","media_videojs/video"],function(a,b){var c=function(){a(document).on(M.core.event.FILTER_CONTENT_UPDATED,d)},d=function(c,d){d.find(".mediaplugin_videojs audio, .mediaplugin_videojs video").each(function(){var c=a(this).attr("id"),d=a(this).data("setup");b(c,d)})};return{setUp:c}});
|
||||
define(["jquery","media_videojs/video"],function(a,b){var c=function(){a(document).on(M.core.event.FILTER_CONTENT_UPDATED,d)},d=function(c,d){var e=".mediaplugin_videojs";d.find(e).addBack(e).find("audio, video").each(function(){var c=a(this).attr("id"),d=a(this).data("setup");b(c,d)})};return{setUp:c}});
|
@ -40,8 +40,15 @@ define(['jquery', 'media_videojs/video'], function($, videojs) {
|
||||
* @param {NodeList} nodes List of new nodes.
|
||||
*/
|
||||
var notifyVideoJS = function(e, nodes) {
|
||||
nodes.find('.mediaplugin_videojs audio, .mediaplugin_videojs video')
|
||||
.each(function() {
|
||||
var selector = '.mediaplugin_videojs';
|
||||
|
||||
// Find the descendants matching the expected parent of the audio and video
|
||||
// tags. Then also addBack the nodes matching the same selector. Finally,
|
||||
// we find the audio and video tags contained in those parents. Kind thanks
|
||||
// to jQuery for the simplicity.
|
||||
nodes.find(selector)
|
||||
.addBack(selector)
|
||||
.find('audio, video').each(function() {
|
||||
var id = $(this).attr('id'),
|
||||
config = $(this).data('setup');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user