discourse/app/assets
Blake Erickson b53df4d884
FIX: Videos not uploading due to thumbnail generation error (#28493)
If we don't get a `videoWidth` back for a video don't try and generate a
thumbnail for it.

Also as part of this change I switched getImageData, the function
throwing the error, to use video.videoWidth instead of canvas.width
because it's very likely we were setting canvas.width too early before
the width could be read. Now that we are reading the value inside of the
setTimeout hopefully we will actually have a width. Just incase we don't
detect a width we will now exit early instead of throwing an error.

We only need to check for `0` and not null because the value is an
integer and will always return a 0 if it can't be read. https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/videoWidth

See https://meta.discourse.org/t/322363
2024-08-22 13:35:18 -06:00
..
images FIX: Use correct location for wizard background image (#24183) 2023-10-31 15:57:47 +00:00
javascripts FIX: Videos not uploading due to thumbnail generation error (#28493) 2024-08-22 13:35:18 -06:00
stylesheets UX: improve mention colors for dark color schemes (#28462) 2024-08-21 11:45:48 -04:00