From 3bf200cb4339e906b944d55451cfacc8aa33bb01 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 7 Sep 2021 17:16:38 +0200 Subject: comment everything and add notes on working on the last museum --- frontend/app/utils/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'frontend/app/utils/index.js') 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 = () => { -- cgit v1.2.3-70-g09d2