ui_migration bugfix(component) add fallback override for img src

This commit is contained in:
Antonio Anaya 2026-06-03 21:43:26 -06:00
parent 8fb445bcbf
commit 5e15a423ee
2 changed files with 3 additions and 5 deletions

View file

@ -88,12 +88,14 @@ export default {
);
this.stopIntersectionObserver = stop;
},
beforeUnmount() {
clearTimeout(this.observerTimeout); // Clean up the timer!
if (this.stopIntersectionObserver) {
this.stopIntersectionObserver();
}
this.store.removeStream(this.streamId);
// Override img source to single pixel and drop MJPEG stream
const imgElement = this.$refs["click-frame"];
if (imgElement) {
imgElement.src = ONE_PIXEL_FALLBACK;

View file

@ -69,10 +69,6 @@ export default {
streamEnabled: function () {
return this.ready && !this.disableStream;
},
streamOpen: function () {
// Only a single MJPEG connection should be open at a time
return !(this.displaySize[0] == 0) && !(this.displaySize[1] == 0);
},
streamImgUri: function () {
// Only request the real stream if it's enabled AND currently visible on screen
if (this.isVisible && this.streamEnabled) {