Browse Source

Fix html5 video format

pull/33/head
Jānis Skarnelis 4 years ago
parent
commit
ca55450c41
  1. 4
      dist/carousel.esm.js
  2. 4
      dist/carousel.umd.js
  3. 4
      dist/fancybox.esm.js
  4. 4
      dist/fancybox.umd.js
  5. 2
      dist/panzoom.controls.esm.js
  6. 2
      dist/panzoom.controls.umd.js
  7. 4
      dist/panzoom.esm.js
  8. 4
      dist/panzoom.umd.js
  9. 5
      package.json
  10. 2
      src/Carousel/Carousel.js
  11. 2
      src/Fancybox/Fancybox.js
  12. 15
      src/Fancybox/l10n/de.js
  13. 0
      src/Fancybox/l10n/en.js
  14. 6
      src/Fancybox/plugins/Html/Html.js

4
dist/carousel.esm.js

File diff suppressed because one or more lines are too long

4
dist/carousel.umd.js

File diff suppressed because one or more lines are too long

4
dist/fancybox.esm.js

File diff suppressed because one or more lines are too long

4
dist/fancybox.umd.js

File diff suppressed because one or more lines are too long

2
dist/panzoom.controls.esm.js

@ -1,2 +1,2 @@
// @fancyapps/ui/Panzoom.Controls v4.0.0-beta.1
// @fancyapps/ui/Panzoom.Controls v4.0.0-alpha.0
class t{constructor(t){this.panzoom=t,this.$container=null}addButton(t,o=!1){const n=document.createElement("button");return n.setAttribute("title",this.panzoom.localize(`{{CONTROLS.${t.toUpperCase()}}}`)),n.classList.add("panzoom__button"),n.classList.add(`panzoom__button--${t}`),n.innerHTML=this.panzoom.localize(this.panzoom.option(`Controls.tpl.${t}`,"")),o&&n.addEventListener("click",(o=>{o.stopPropagation(),this.panzoom[t]()})),this.$container.appendChild(n),n}createContainer(){if(this.$container)return;const t=document.createElement("div");t.classList.add("panzoom__controls"),this.$container=this.panzoom.$viewport.appendChild(t);for(const t of this.panzoom.option("Controls.buttons",[]))this.addButton(t,!0)}removeContainer(){this.$container&&(this.$container.remove(),this.$container=null)}attach(){this.createContainer()}detach(){this.removeContainer()}}t.defaults={l10n:{ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out"},buttons:["zoomIn","zoomOut"],tpl:{zoomIn:'<svg tabindex="-1" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4V20M20 12L4 12" /></svg>',zoomOut:'<svg tabindex="-1" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 12H4" /></svg>'}};export{t as Controls};

2
dist/panzoom.controls.umd.js

@ -1,2 +1,2 @@
// @fancyapps/ui/Panzoom.Controls v4.0.0-beta.1
// @fancyapps/ui/Panzoom.Controls v4.0.0-alpha.0
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function(t){"use strict";function n(t,n){for(var o=0;o<n.length;o++){var e=n[o];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var o=0,e=new Array(n);o<n;o++)e[o]=t[o];return e}function e(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=function(t,n){if(t){if("string"==typeof t)return o(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return l=t.done,t},e:function(t){u=!0,a=t},f:function(){try{l||null==e.return||e.return()}finally{if(u)throw a}}}}var r=function(){function t(n){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.panzoom=n,this.$container=null}var o,r,i;return o=t,(r=[{key:"addButton",value:function(t){var n=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=document.createElement("button");return e.setAttribute("title",this.panzoom.localize("{{CONTROLS.".concat(t.toUpperCase(),"}}"))),e.classList.add("panzoom__button"),e.classList.add("panzoom__button--".concat(t)),e.innerHTML=this.panzoom.localize(this.panzoom.option("Controls.tpl.".concat(t),"")),o&&e.addEventListener("click",(function(o){o.stopPropagation(),n.panzoom[t]()})),this.$container.appendChild(e),e}},{key:"createContainer",value:function(){if(!this.$container){var t=document.createElement("div");t.classList.add("panzoom__controls"),this.$container=this.panzoom.$viewport.appendChild(t);var n,o=e(this.panzoom.option("Controls.buttons",[]));try{for(o.s();!(n=o.n()).done;){var r=n.value;this.addButton(r,!0)}}catch(t){o.e(t)}finally{o.f()}}}},{key:"removeContainer",value:function(){this.$container&&(this.$container.remove(),this.$container=null)}},{key:"attach",value:function(){this.createContainer()}},{key:"detach",value:function(){this.removeContainer()}}])&&n(o.prototype,r),i&&n(o,i),t}();r.defaults={l10n:{ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out"},buttons:["zoomIn","zoomOut"],tpl:{zoomIn:'<svg tabindex="-1" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4V20M20 12L4 12" /></svg>',zoomOut:'<svg tabindex="-1" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 12H4" /></svg>'}},t.Controls=r}));

4
dist/panzoom.esm.js

File diff suppressed because one or more lines are too long

4
dist/panzoom.umd.js

File diff suppressed because one or more lines are too long

5
package.json

@ -1,5 +1,5 @@
{
"name": "ui",
"name": "@fancyapps/ui",
"version": "4.0.0-alpha.0",
"description": "JavaScript UI Component Library",
"main": "dist/fancybox.umd.js",
@ -85,5 +85,6 @@
">0.2%",
"not dead",
"not op_mini all"
]
],
"dependencies": {}
}

2
src/Carousel/Carousel.js

@ -197,10 +197,12 @@ export class Carousel extends Base {
return;
}
// if (this.option("center") && !this.option("fill")) {
panzoom.boundX = {
from: this.pages[this.pages.length - 1].left * -1,
to: this.pages[0].left * -1,
};
// }
}
initPanzoom() {

2
src/Fancybox/Fancybox.js

@ -94,7 +94,9 @@ const defaults = {
CLOSE: "Close",
NEXT: "Next",
PREV: "Previous",
MODAL: "You can close this modal content with the ESC key",
ERROR: "Something Went Wrong, Please Try Again Later",
IMAGE_ERROR: "Image Not Found",
ELEMENT_NOT_FOUND: "HTML Element Not Found",

15
src/Fancybox/l10n/de.js

@ -2,11 +2,12 @@ export default {
CLOSE: "Schlie&szlig;en",
NEXT: "Weiter",
PREV: "Zur&uuml;ck",
MODAL: "Sie können diesen modalen Inhalt mit der ESC-Taste schließen",
ERROR: "Die angeforderten Daten konnten nicht geladen werden. Bitte versuchen Sie es sp&auml;ter nochmal.",
IMAGE_ERROR: "Bild nicht gefunden",
ELEMENT_NOT_FOUND: "HTML-Element nicht gefunden",
AJAX_NOT_FOUND: "Fehler beim Laden von AJAX: Nicht gefunden",
AJAX_FORBIDDEN: "Fehler beim Laden von AJAX: Verboten",
IFRAME_ERROR: "Fehler beim Laden der Seite",
ERROR: "Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es sp&auml;ter nochmal.",
PLAY_START: "Diaschau starten",
PLAY_STOP: "Diaschau beenden",
FULL_SCREEN: "Vollbild",
THUMBS: "Vorschaubilder",
DOWNLOAD: "Herunterladen",
SHARE: "Teilen",
ZOOM: "Vergr&ouml;&szlig;ern",
};

0
src/Fancybox/l10n/en.js

6
src/Fancybox/plugins/Html/Html.js

@ -116,7 +116,7 @@ export class Html {
slide.vendor = "youtube";
type = "video";
} else if ((rez = src.match(/^.+vimeo.com\/(?:.*\/)?([\d]+)(?:.*)?/))) {
} else if ((rez = src.match(/^.+vimeo.com\/(?:\/)?([\d]+)(.*)?/))) {
const params = buildURLQuery(this.fancybox.option("Html.vimeo"));
const videoId = encodeURIComponent(rez[1]);
@ -149,7 +149,7 @@ export class Html {
} else if ((rez = src.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))) {
type = "html5video";
slide.format = "video/" + (rez[1] === "ogv" ? "ogg" : rez[1]);
slide.format = slide.format || "video/" + (rez[1] === "ogv" ? "ogg" : rez[1]);
} else if (src.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)) {
type = "image";
} else if (src.match(/\.(pdf)((\?|#).*)?$/i)) {
@ -427,7 +427,7 @@ export class Html {
this.fancybox
.option("Html.html5video.tpl")
.replace(/\{\{src\}\}/gi, slide.src)
.replace("{{format}}", slide.videoFormat || (slide.html5video && slide.html5video.format) || "")
.replace("{{format}}", slide.format || (slide.html5video && slide.html5video.format) || "")
.replace("{{poster}}", slide.thumb || "")
);

Loading…
Cancel
Save