summaryrefslogtreecommitdiff
path: root/frontend/app/utils/index.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-09-07 17:16:38 +0200
committerJules Laplace <julescarbon@gmail.com>2021-09-07 17:16:38 +0200
commit3bf200cb4339e906b944d55451cfacc8aa33bb01 (patch)
treef0da6480d866b907cae7b258a3e56a1a7b827aae /frontend/app/utils/index.js
parent30aff969375213db8c66af5f108496f465057787 (diff)
comment everything and add notes on working on the last museum
Diffstat (limited to 'frontend/app/utils/index.js')
-rw-r--r--frontend/app/utils/index.js3
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 = () => {