socket improvements

- setters broadcast change
- added lower third message
- add current event title message
- restrict to websockets transport
This commit is contained in:
cv
2021-04-13 21:42:57 +02:00
parent 4a2fc378fb
commit cdbcdef99a
5 changed files with 76 additions and 20 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ function SocketProvider(props) {
const [socket, setSocket] = useState();
useEffect(() => {
const socket = io(serverURL);
const socket = io(serverURL, { transports: ['websocket'] });
setSocket(socket);
return () => socket.disconnect();
}, []);