1(function($, Drupal, undefined){ 2 /** 3 * When set to enable mediaelement for all audio/video files add it to the page. 4 */ 5 Drupal.behaviors.mediaelement = { 6 attach: function(context, settings) { 7 if (settings.mediaelement !== undefined) { 8 // @todo Remove anonymous function. 9 $.each(settings.mediaelement, function(selector, options) { 10 var opts; 11 $(selector, context).once('mediaelement', function() { 12 if (options.controls) { 13 $(this).mediaelementplayer(options.opts); 14 } 15 else { 16 $(this).mediaelement(); 17 } 18 }); 19 }); 20 } 21 // The global option is seperate from the other selectors as it should be 22 // run after any other selectors. 23 if (settings.mediaelementAll !== undefined) { 24 $('video,audio', context).once('mediaelement', function() { 25 $(this).mediaelementplayer(); 26 }); 27 } 28 } 29 }; 30})(jQuery, Drupal);;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.