added audioplayer contrib module

This commit is contained in:
Bachir Soussi Chiadmi
2017-11-25 16:05:32 +01:00
parent ff23c45e43
commit 0942e9a212
174 changed files with 21682 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
import reqAnimationFrame from './request-animation-frame';
/**
* Create a function which will be called at the next requestAnimationFrame
* cycle
*
* @param {function} func The function to call
*
* @return {func} The function wrapped within a requestAnimationFrame
*/
export default function frame (func) {
return (...args) => reqAnimationFrame(() => func(...args));
}