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 ++- frontend/app/views/page/components/page.editor.js | 2 +- frontend/app/views/tile/components/tile.form.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'frontend/app') 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 = () => { diff --git a/frontend/app/views/page/components/page.editor.js b/frontend/app/views/page/components/page.editor.js index a64edb2..84740d5 100644 --- a/frontend/app/views/page/components/page.editor.js +++ b/frontend/app/views/page/components/page.editor.js @@ -54,7 +54,7 @@ class PageEditor extends Component { width: rect.width, height: rect.height, } - // console.log(bounds) + console.log("bounds", bounds) return bounds } diff --git a/frontend/app/views/tile/components/tile.form.js b/frontend/app/views/tile/components/tile.form.js index a3c3131..2f805a6 100644 --- a/frontend/app/views/tile/components/tile.form.js +++ b/frontend/app/views/tile/components/tile.form.js @@ -232,7 +232,7 @@ class TileForm extends Component { const { name, value } = e.target this.handleSettingsSelect(name, value) preloadVideo(value).then(video => { - // console.log(img) + console.log(video.videoWidth, video.videoHeight) this.props.tileActions.updateTemporaryTile({ ...this.props.temporaryTile, settings: { -- cgit v1.2.3-70-g09d2