diff options
Diffstat (limited to 'frontend/app/utils/index.js')
| -rw-r--r-- | frontend/app/utils/index.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/app/utils/index.js b/frontend/app/utils/index.js index 400637e..95660c5 100644 --- a/frontend/app/utils/index.js +++ b/frontend/app/utils/index.js @@ -152,8 +152,9 @@ export const preloadImage = url => ( }) ) -export const preloadVideo = (url, { canplaythrough }) => ( +export const preloadVideo = (url, options = {}) => ( new Promise((resolve, reject) => { + const { canplaythrough } = options const video = document.createElement('video') let loaded = false const bind = () => { |
