MDL-57101 media_videojs: Load legacy events before use
authorAndrew Nicols <andrew@nicols.co.uk>
Fri, 2 Dec 2016 00:58:19 +0000 (08:58 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Fri, 2 Dec 2016 00:58:19 +0000 (08:58 +0800)
media/player/videojs/amd/build/loader.min.js
media/player/videojs/amd/src/loader.js

index 3b639a5..436b2da 100644 (file)
Binary files a/media/player/videojs/amd/build/loader.min.js and b/media/player/videojs/amd/build/loader.min.js differ
index 202b33c..be7a1f0 100644 (file)
@@ -22,7 +22,7 @@
  * @copyright  2016 Frédéric Massart - FMCorz.net
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-define(['jquery', 'media_videojs/video'], function($, videojs) {
+define(['jquery', 'media_videojs/video', 'core/event'], function($, videojs, Event) {
 
     /**
      * Set-up.
@@ -30,7 +30,10 @@ define(['jquery', 'media_videojs/video'], function($, videojs) {
      * Adds the listener for the event to then notify video.js.
      */
     var setUp = function() {
-        $(document).on(M.core.event.FILTER_CONTENT_UPDATED, notifyVideoJS);
+        // We need to call popover automatically if nodes are added to the page later.
+        Event.getLegacyEvents().done(function(events) {
+            $(document).on(events.FILTER_CONTENT_UPDATED, notifyVideoJS);
+        });
     };
 
     /**