Add comment
This commit is contained in:
@@ -57,6 +57,10 @@ export class FrigateCardThumbnailFeatureEvent extends LitElement {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
//eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
//eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
this.hass!.fetchWithAuth(thumbnail)
|
this.hass!.fetchWithAuth(thumbnail)
|
||||||
|
// Since we are fetching with an authorization header, we cannot just put the
|
||||||
|
// URL directly into the document; we need to embed the image. We could do this
|
||||||
|
// using blob URLs, but then we would need to keep track of them in order to
|
||||||
|
// release them properly. Instead, we embed the thumbnail using base64.
|
||||||
.then((response) => response.blob())
|
.then((response) => response.blob())
|
||||||
.then((blob) => {
|
.then((blob) => {
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
|
|||||||
Reference in New Issue
Block a user