mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 03:43:39 +08:00
b53df4d884
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 |
||
---|---|---|
.. | ||
admin | ||
custom-proxy | ||
deprecation-silencer | ||
dialog-holder | ||
discourse | ||
discourse-common | ||
discourse-hbr | ||
discourse-i18n | ||
discourse-markdown-it | ||
discourse-plugins | ||
discourse-widget-hbs | ||
docs | ||
ember-addons | ||
ember-cli-progress-ci | ||
ember-production-deprecations | ||
float-kit | ||
locales | ||
pretty-text | ||
select-kit | ||
theme-transpiler | ||
truth-helpers | ||
.npmrc | ||
handlebars-shim.js | ||
polyfills.js | ||
run-patch-package | ||
service-worker.js.erb |