added audioplayer contrib module
This commit is contained in:
@@ -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));
|
||||
}
|
||||
Reference in New Issue
Block a user