discourse/app
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
..
assets FIX: Videos not uploading due to thumbnail generation error (#28493) 2024-08-22 13:35:18 -06:00
controllers DEV: Use Service::Base for suspend and silence actions (#28459) 2024-08-22 14:38:56 +03:00
helpers UX: Use localized time format in embedded comments (#28014) 2024-07-22 18:42:36 +08:00
jobs DEV: Allow using an AR relation as a model in services 2024-08-20 16:32:46 +02:00
mailers UX: Use a dropdown for SSL mode for group SMTP (#27932) 2024-07-18 10:33:14 +10:00
models DEV: Use Service::Base for suspend and silence actions (#28459) 2024-08-22 14:38:56 +03:00
serializers FIX: Don't show silence button on staff users and display similar users (#28423) 2024-08-20 15:27:29 +03:00
services DEV: Use Service::Base for suspend and silence actions (#28459) 2024-08-22 14:38:56 +03:00
views DEV: Convert account activation pages to use Ember (#28206) 2024-08-12 18:02:00 -03:00