- composer update -W: core-recommended ^11.4 (11.4.13), drush ^13.8, gin ^5.0, symfony 7 - scan p2 packages.drupal.org: 98/101 modules ont une release compatible D11; contraintes racine+profil relevées - takeover custom: audiofield + bulkdelete (plus de branche D11 upstream), q2d_mod blocs convertis en attributs PHP 8 - patch core 2671162 supprimé (fix mergé dans D11), 2645922 gardé, patches image_field_caption réappliqués - seven retiré (plus dans le core D11), claro déjà présent pour gin - updb OK, change list entity vide, cim OK, cex commit (normalisation config) - allow-plugins symfony/runtime ajouté Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
118 lines
3.7 KiB
JavaScript
118 lines
3.7 KiB
JavaScript
/**
|
|
* DO NOT EDIT THIS FILE.
|
|
* See the following change record for more information,
|
|
* https://www.drupal.org/node/2815083
|
|
* @preserve
|
|
**/
|
|
|
|
(function ($, Drupal, once) {
|
|
'use strict';
|
|
|
|
Drupal.AudiofieldJplayer = {};
|
|
|
|
Drupal.AudiofieldJplayer.generate = function (context, settings) {
|
|
var element = once('generate-jplayer', '#jquery_jplayer_' + settings.unique_id, context);
|
|
$(element).jPlayer({
|
|
cssSelectorAncestor: '#jp_container_' + settings.unique_id
|
|
}, {
|
|
ready: function ready() {
|
|
var mediaArray = {
|
|
title: settings.description
|
|
};
|
|
mediaArray[settings.filetype] = settings.file;
|
|
$('#jquery_jplayer_' + settings.unique_id, context).jPlayer('setMedia', mediaArray);
|
|
},
|
|
canplay: function canplay() {
|
|
if (!!settings.autoplay) {
|
|
$('#jquery_jplayer_' + settings.unique_id, context).jPlayer('play');
|
|
}
|
|
},
|
|
swfPath: '/libraries/jplayer/dist/jplayer',
|
|
supplied: settings.filetype,
|
|
wmode: 'window',
|
|
useStateClassSkin: true,
|
|
autoBlur: false,
|
|
preload: settings.lazyload,
|
|
smoothPlayBar: true,
|
|
keyEnabled: true,
|
|
remainingDuration: false,
|
|
toggleDuration: false,
|
|
volume: settings.volume
|
|
});
|
|
};
|
|
|
|
Drupal.AudiofieldJplayer.generatePlaylist = function (context, settings) {
|
|
var elements = once('generate-jplayer', '#jquery_jplayer_' + settings.unique_id, context);
|
|
$.each(elements, function (index, item) {
|
|
var thisPlaylist = new jPlayerPlaylist({
|
|
jPlayer: $(item),
|
|
cssSelectorAncestor: '#jp_container_' + settings.unique_id
|
|
}, [], {
|
|
canplay: function canplay() {
|
|
if (!!settings.autoplay) {
|
|
$(item).jPlayer('play');
|
|
}
|
|
},
|
|
playlistOptions: {
|
|
enableRemoveControls: false
|
|
},
|
|
swfPath: '/libraries/jplayer/dist/jplayer',
|
|
wmode: 'window',
|
|
useStateClassSkin: true,
|
|
autoBlur: false,
|
|
preload: settings.lazyload,
|
|
smoothPlayBar: true,
|
|
keyEnabled: true,
|
|
volume: settings.volume
|
|
});
|
|
|
|
$.each(settings.files, function (key, fileEntry) {
|
|
var mediaArray = {
|
|
title: fileEntry.description
|
|
};
|
|
mediaArray[fileEntry.filetype] = fileEntry.file;
|
|
|
|
thisPlaylist.add(mediaArray);
|
|
});
|
|
});
|
|
};
|
|
|
|
Drupal.AudiofieldJplayer.generateCircle = function (context, file) {
|
|
var elements = once('generate-jplayer', '#jquery_jplayer_' + file.fid, context);
|
|
$.each(elements, function (index, item) {
|
|
var mediaArray = {};
|
|
mediaArray[file.filetype] = file.file;
|
|
|
|
new CirclePlayer($(item), mediaArray, {
|
|
cssSelectorAncestor: '#cp_container_' + file.fid,
|
|
canplay: function canplay() {
|
|
if (!!file.autoplay) {
|
|
$(item).jPlayer('play');
|
|
}
|
|
},
|
|
swfPath: '/libraries/jplayer/dist/jplayer',
|
|
wmode: 'window',
|
|
keyEnabled: true,
|
|
preload: file.lazyload,
|
|
supplied: file.filetype
|
|
});
|
|
});
|
|
};
|
|
|
|
Drupal.behaviors.audiofieldjplayer = {
|
|
attach: function attach(context, settings) {
|
|
$.each(settings.audiofieldjplayer, function (key, settingEntry) {
|
|
if (settingEntry.playertype === 'default') {
|
|
Drupal.AudiofieldJplayer.generate(context, settingEntry);
|
|
} else if (settingEntry.playertype === 'playlist') {
|
|
Drupal.AudiofieldJplayer.generatePlaylist(context, settingEntry);
|
|
} else if (settingEntry.playertype === 'circle') {
|
|
$.each(settingEntry.files, function (key2, fileEntry) {
|
|
Drupal.AudiofieldJplayer.generateCircle(context, fileEntry);
|
|
});
|
|
}
|
|
});
|
|
}
|
|
};
|
|
})(jQuery, Drupal, once);
|