mediaelement.builder.js 865 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/2815083
  5. * @preserve
  6. **/
  7. (function ($, Drupal) {
  8. 'use strict';
  9. Drupal.AudiofieldMediaelement = {};
  10. Drupal.AudiofieldMediaelement.generate = function (context, file, settings) {
  11. $(file, context).once('generate-mediaelement').mediaelementplayer({
  12. startVolume: settings.volume,
  13. loop: false,
  14. enableAutosize: true,
  15. isVideo: false
  16. });
  17. };
  18. Drupal.behaviors.audiofieldmediaelement = {
  19. attach: function attach(context, settings) {
  20. $.each(settings.audiofieldmediaelement, function (key, settingEntry) {
  21. $.each(settingEntry.elements, function (key2, fileEntry) {
  22. Drupal.AudiofieldMediaelement.generate(context, fileEntry, settingEntry);
  23. });
  24. });
  25. }
  26. };
  27. })(jQuery, Drupal);