Placeholder while loading mediatag and broken images for 404
This commit is contained in:
parent
8db0fcf8bd
commit
d5a3581469
@ -435,9 +435,14 @@
|
|||||||
return mediaObject;
|
return mediaObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mediaObject.tag.innerHTML = '<img style="width: 100px; height: 100px;">';
|
||||||
|
|
||||||
// Download the encrypted blob
|
// Download the encrypted blob
|
||||||
download(src, function (err, u8Encrypted) {
|
download(src, function (err, u8Encrypted) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
if (err === "XHR_ERROR 404") {
|
||||||
|
mediaObject.tag.innerHTML = '<img style="width: 100px; height: 100px;" src="/images/broken.png">';
|
||||||
|
}
|
||||||
return void emit('error', err);
|
return void emit('error', err);
|
||||||
}
|
}
|
||||||
// Decrypt the blob
|
// Decrypt the blob
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user