Browse Source

Suite de r108317 : pas de mejs__player sur video non plus, et aussi on evite que le script mejs-init de doublle initialise un audio ou un video avec cette classe

3.2
cedric@yterium.com 5 years ago
parent
commit
d1c86db862
  1. 2
      javascript/mejs-init.js
  2. 2
      javascript/mejs-init.min.js
  3. 2
      modeles/video.html
  4. 2
      paquet.xml

2
javascript/mejs-init.js

@ -17,7 +17,7 @@ var mejsloader;
L.init = function (){
if (!(L.gs===true)) return;
(function ($){
jQuery("audio.mejs,video.mejs").not('.done').each(function (){
jQuery("audio.mejs,video.mejs").not('.done,.mejs__player').each(function (){
var me = jQuery(this).addClass('done');
var id;
if (!(id = me.attr('id'))){

2
javascript/mejs-init.min.js vendored

@ -1,4 +1,4 @@
var mejsloader;
(function(){var a=mejsloader;"undefined"==typeof a&&(mejsloader=a={gs:null,plug:{},css:{},init:null,c:0,cssload:null});a.init||(a.cssload=function(c){if("undefined"==typeof a.css[c]){a.css[c]=!0;var b=document.createElement("link");b.href=c;b.rel="stylesheet";b.type="text/css";document.getElementsByTagName("head")[0].appendChild(b)}},a.init=function(){!0===a.gs&&function(c){jQuery("audio.mejs,video.mejs").not(".done").each(function(){function b(){var e=!0,h;for(h in d.css)a.cssload(d.css[h]);for(var f in d.plugins)"undefined"==
(function(){var a=mejsloader;"undefined"==typeof a&&(mejsloader=a={gs:null,plug:{},css:{},init:null,c:0,cssload:null});a.init||(a.cssload=function(c){if("undefined"==typeof a.css[c]){a.css[c]=!0;var b=document.createElement("link");b.href=c;b.rel="stylesheet";b.type="text/css";document.getElementsByTagName("head")[0].appendChild(b)}},a.init=function(){!0===a.gs&&function(c){jQuery("audio.mejs,video.mejs").not(".done,.mejs__player").each(function(){function b(){var e=!0,h;for(h in d.css)a.cssload(d.css[h]);for(var f in d.plugins)"undefined"==
typeof a.plug[f]?(e=!1,a.plug[f]=!1,jQuery.getScript(d.plugins[f],function(){a.plug[f]=!0;b()})):0==a.plug[f]&&(e=!1);e&&jQuery("#"+c).mediaelementplayer(jQuery.extend(d.options,{success:function(a,c){function b(){var b=jQuery(a).closest(".mejs__inner");a.paused?(b.addClass("pausing"),setTimeout(function(){b.filter(".pausing").removeClass("playing").removeClass("pausing").addClass("paused")},100)):b.removeClass("paused").removeClass("pausing").addClass("playing")}b();a.addEventListener("play",b,!1);
a.addEventListener("playing",b,!1);a.addEventListener("pause",b,!1);a.addEventListener("paused",b,!1);g.attr("autoplay")&&a.play()}}))}var g=jQuery(this).addClass("done"),c;(c=g.attr("id"))||(c="mejs-"+g.attr("data-id")+"-"+a.c++,g.attr("id",c));var d={options:{},plugins:{},css:[]},e,h;for(e in d)if(h=g.attr("data-mejs"+e))d[e]=jQuery.parseJSON(h);b()})}(jQuery)});a.gs||("undefined"!==typeof mejscss&&a.cssload(mejscss),a.gs=jQuery.getScript(mejspath,function(){a.gs=!0;a.init();jQuery(a.init);onAjaxLoad(a.init)}))})();

2
modeles/video.html

@ -11,7 +11,7 @@
style='[(#ENV{align}|match{^(left|right)$}|oui)float:#ENV{align};][width:(#GET{largeur})px]'>
<div class="video-intrinsic-wrapper" style='height:0;width:100%;padding-bottom:[(#GET{hauteur}|div{#GET{largeur}}|mult{100}|round{2})]%;position:relative;'>
<div class="video-wrapper" style="position: absolute;top:0;left:0;width:100%;height:100%;">
<video class="mejs mejs__player mejs-#ID_DOCUMENT[ mejs-(#ENV{skin})]"
<video class="mejs mejs-#ID_DOCUMENT[ mejs-(#ENV{skin})]"
data-id="[(#VAL{mejs-#ID_DOCUMENT}|concat{#ENV{skin}}|md5)]"
data-mejsoptions='{"alwaysShowControls": true,"pluginPath":"[(#CHEMIN{lib/mejs/flashmediaelement.swf}|dirname)/]"[,"loop":(#ENV{loop}|?{true,false})],"videoWidth":"100%","videoHeight":"100%"[,"startVolume":"(#ENV{volume})"]}'
width="100%"

2
paquet.xml

@ -1,7 +1,7 @@
<paquet
prefix="medias"
categorie="multimedia"
version="2.20.20"
version="2.20.21"
etat="stable"
compatibilite="[3.2.0;3.2.*]"
logo="prive/themes/spip/images/portfolio-32.png"

Loading…
Cancel
Save