projekktor.builder.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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.AudiofieldProjekktor = {};
  10. Drupal.AudiofieldProjekktor.generate = function (context, file, settings) {
  11. $.each($(context).find('#' + file).once('generate-projekktor'), function (index, item) {
  12. projekktor($(item), {
  13. debug: false,
  14. playerFlashMP4: settings.swfpath,
  15. playerFlashMP3: settings.swfpath,
  16. enableFullscreen: false,
  17. streamType: 'http',
  18. controls: true,
  19. thereCanBeOnlyOne: true,
  20. volume: settings.volume,
  21. autoplay: !!settings.autoplay,
  22. plugin_display: {}
  23. }, {});
  24. });
  25. };
  26. Drupal.behaviors.audiofieldprojekktor = {
  27. attach: function attach(context, settings) {
  28. jQuery(function () {
  29. $.each(settings.audiofieldprojekktor, function (key, settingEntry) {
  30. $.each(settingEntry.files, function (key2, file) {
  31. Drupal.AudiofieldProjekktor.generate(context, file, settingEntry);
  32. });
  33. });
  34. });
  35. }
  36. };
  37. })(jQuery, Drupal);