mirror of
https://github.com/UiO-Gaming/infoscreen3.git
synced 2026-11-07 06:44:30 +01:00
Merge pull request #49 from kasimos/fixLobby
Fix connection to lobby socket
This commit is contained in:
2 files changed
+10
-5
No files matched your search
@@ -105,13 +105,18 @@ export default class adminLobby {
|
||||
socket.on('controls.pause', function (data) {
|
||||
getAdminView(data.displayId).controls("pause");
|
||||
});
|
||||
|
||||
dispatcher.on("dashboard.update", function (data) {
|
||||
|
||||
cli.info('admin lobby adding dispatcher on dashboard.update count:' + dispatcher.rawListeners("dashboard.update").length);
|
||||
let dashboardUpdateHandler = function (data) {
|
||||
socket.emit("callback.serverOptions", [data]);
|
||||
});
|
||||
};
|
||||
dispatcher.on("dashboard.update", dashboardUpdateHandler);
|
||||
|
||||
socket.on("disconnect", function (s) {
|
||||
dispatcher.removeListener('dashboard.update', dashboardUpdateHandler);
|
||||
cli.info("admin lobby socket disconnect");
|
||||
})
|
||||
});
|
||||
|
||||
function updateSlides(bundleName, bundleData) {
|
||||
for (let aView of adminView) {
|
||||
aView.updateSlides();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{% block header %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
<script>
|
||||
var socket = io("{{ config.serverUrl }}/admin-{{ displayId }}");
|
||||
var socket = io("{{ config.serverUrl }}/admin");
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in new issue
Block a user