Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed preloading of videos #330

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/jquery.nanogallery2.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2097,7 +2097,7 @@
// author: underscore.js - http://underscorejs.org/docs/underscore.html
// Returns a function, that, when invoked, will only be triggered at most once during a given window of time.
// Normally, the throttled function will run as much as it can, without ever going more than once per wait duration;
// but if youd like to disable the execution on the leading edge, pass {leading: false}.
// but if you’d like to disable the execution on the leading edge, pass {leading: false}.
// To disable execution on the trailing edge, ditto.
var throttle = function(func, wait, options) {
var context, args, result;
Expand Down Expand Up @@ -6194,7 +6194,7 @@
markup: function( url ) {
// return '<video controls class="nGY2ViewerMedia"><source src="${id.src}" type="video/${id.type}" preload="auto">Your browser does not support the video tag (HTML 5).</video>';
var extension = url.split('.').pop();
return '<video controls class="nGY2ViewerMedia"><source src="'+ url +'" type="video/'+ extension +'" preload="auto">Your browser does not support the video tag (HTML 5).</video>';
return '<video controls class="nGY2ViewerMedia" preload="auto"><source src="'+ url +'" type="video/'+ extension +'">Your browser does not support the video tag (HTML 5).</video>';
},
kind: 'video',
selfhosted : true
Expand Down Expand Up @@ -7888,7 +7888,7 @@
};
}

// requestAnimationFrame polyfill by Erik M�ller. fixes from Paul Irish and Tino Zijdel
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// MIT license
Expand Down Expand Up @@ -8396,7 +8396,7 @@
var vimg = new VImg(ngy2ItemIdx);
G.VOM.items.push(vimg);
items.push(G.I[ngy2ItemIdx]);
//TODO -> danger? -> pourquoi reconstruire la liste si d�j� ouvert (back/forward)
//TODO -> danger? -> pourquoi reconstruire la liste si déjà ouvert (back/forward)
var l = G.I.length;
for( let idx = ngy2ItemIdx+1; idx < l ; idx++) {
let item = G.I[idx];
Expand Down