From c0e9fbfc788c086c37bd2e5a087ce084cbec6031 Mon Sep 17 00:00:00 2001 From: Luke Murray Date: Thu, 24 Nov 2016 21:45:17 +1100 Subject: [PATCH] when playing we shouldn't load if we are past the total frames --- src/jquery.imgplay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jquery.imgplay.js b/src/jquery.imgplay.js index f8bbd4b..4478978 100644 --- a/src/jquery.imgplay.js +++ b/src/jquery.imgplay.js @@ -343,7 +343,7 @@ screen.clearRect(0, 0, cw, ch); screen.drawImage(img, (cw - vw) / 2, (ch - vh) / 2, vw, vh); } - } else if (buffer.length) { + } else if (buffer.length && index < total) { var wasPlaying = playing; plugin.pause();