From 29fd88db307d8f322ff4bd52ca578f8d1cb96203 Mon Sep 17 00:00:00 2001 From: agamemnus Date: Sun, 11 Jun 2017 12:47:41 -0400 Subject: [PATCH] requestAnimationFrame should be bound on window... (#1120) Apparently... https://stackoverflow.com/questions/10743596/why-are-certain-function-calls-termed-illegal-invocations-in-javascript --- src/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.js b/src/util.js index d228b3893..faf326fe6 100644 --- a/src/util.js +++ b/src/util.js @@ -7,7 +7,7 @@ WaveSurfer.util = { window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback, element) { setTimeout(callback, 1000 / 60); } - ), + ).bind(window), frame: function (func) { return function () {