Improved player

This commit is contained in:
Thomas
2020-07-31 15:09:37 +02:00
parent c577d8f360
commit 76c6b45e2b
5 changed files with 120 additions and 33 deletions

View File

@@ -124,9 +124,10 @@ const mutations = {
},
LEAVE (state) {
state.peers.forEach((peer) => {
peer.dataChannel.close()
peer.connection.close()
})
state.peers = {}
state.peers = []
},
BROADCAST (state, { message, type }) {
const data = JSON.stringify({