summaryrefslogtreecommitdiff
path: root/frontend/app
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
parent30aff969375213db8c66af5f108496f465057787 (diff)
comment everything and add notes on working on the last museum
Diffstat (limited to 'frontend/app')
-rw-r--r--frontend/app/utils/index.js3
-rw-r--r--frontend/app/views/page/components/page.editor.js2
-rw-r--r--frontend/app/views/tile/components/tile.form.js2
3 files changed, 4 insertions, 3 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 = () => {
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: {