Switch to native WebSocket in UI (#649)

Greatly improves Firefox performance
This commit is contained in:
Matt
2022-12-27 07:23:55 -08:00
committed by GitHub
parent 4382b8ea3f
commit 95c55f08cf
6 changed files with 242 additions and 300 deletions

View File

@@ -15,16 +15,15 @@ if (process.env.NODE_ENV === "production") {
Vue.prototype.$address = location.hostname + ":5800";
}
const wsDataURL = '//' + Vue.prototype.$address + '/websocket_data';
// const wsDataURL = '//' + Vue.prototype.$address + '/websocket_data';
// import VueNativeSock from 'vue-native-websocket';
// Vue.use(VueNativeSock, wsDataURL, {
// reconnection: true,
// reconnectionDelay: 100,
// connectManually: true,
// format: "arraybuffer",
// });
import VueNativeSock from 'vue-native-websocket';
Vue.use(VueNativeSock, wsDataURL, {
reconnection: true,
reconnectionDelay: 100,
connectManually: true,
format: "arraybuffer",
});
Vue.use(VueAxios, axios);
Vue.prototype.$msgPack = msgPack(true);