Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

cleanup

Ginger Wong3ad162b61051
diff --git a/webroot/js/app.js b/webroot/js/app.js
index 56ff53b86d..29e355f282 100644
--- a/webroot/js/app.js
+++ b/webroot/js/app.js
@@ -114,6 +114,7 @@ export default class App extends Component {
clearInterval(this.statusTimer);
clearTimeout(this.disableChatTimer);
clearInterval(this.streamDurationTimer);
+ window.removeEventListener('resize', this.handleWindowResize);
}
// fetch /config data
diff --git a/webroot/js/components/chat/chat.js b/webroot/js/components/chat/chat.js
index 2953de1b3f..e6a24de32f 100644
--- a/webroot/js/components/chat/chat.js
+++ b/webroot/js/components/chat/chat.js
@@ -56,6 +56,12 @@ export default class Chat extends Component {
}
}
+ componentWillUnmount() {
+ if (hasTouchScreen()) {
+ window.removeEventListener("orientationchange", setVHvar);
+ }
+ }
+
setupWebSocketCallbacks() {
this.websocket = this.props.websocket;
if (this.websocket) {
diff --git a/webroot/js/utils/helpers.js b/webroot/js/utils/helpers.js
index 1f913e8f96..06aefecb87 100644
--- a/webroot/js/utils/helpers.js
+++ b/webroot/js/utils/helpers.js
@@ -142,18 +142,3 @@ export function debounce(fn, time) {
timeout = setTimeout(functionCall, time);
}
}
-
-/*
-const debouncedHandleResize = debounce(function handleResize() {
- setDimensions({
- height: window.innerHeight,
- width: window.innerWidth
- })
-}, 1000)
-window.addEventListener('resize', debouncedHandleResize)
-window.addEventListener('keyup', debounce((e) => {
- console.log(e);
-}, 1000));
-
-*/
-