|
@ -67,6 +67,8 @@ const state = { |
|
|
}, |
|
|
}, |
|
|
connecting: { |
|
|
connecting: { |
|
|
}, |
|
|
}, |
|
|
|
|
|
connectionFailed: { |
|
|
|
|
|
}, |
|
|
typing: { |
|
|
typing: { |
|
|
}, |
|
|
}, |
|
|
speaking: { |
|
|
speaking: { |
|
@ -90,6 +92,9 @@ const getters = { |
|
|
isConnecting: (state) => (token) => { |
|
|
isConnecting: (state) => (token) => { |
|
|
return !!(state.connecting[token] && Object.keys(state.connecting[token]).length > 0) |
|
|
return !!(state.connecting[token] && Object.keys(state.connecting[token]).length > 0) |
|
|
}, |
|
|
}, |
|
|
|
|
|
connectionFailed: (state) => (token) => { |
|
|
|
|
|
return (state.connectionFailed[token] && Object.keys(state.connectionFailed[token]).length > 0) ?? false |
|
|
|
|
|
}, |
|
|
/** |
|
|
/** |
|
|
* Gets the participants array. |
|
|
* Gets the participants array. |
|
|
* |
|
|
* |
|
@ -309,6 +314,9 @@ const mutations = { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setInCall(state, { token, sessionId, flags }) { |
|
|
setInCall(state, { token, sessionId, flags }) { |
|
|
|
|
|
if (state.connectionFailed[token]) { |
|
|
|
|
|
Vue.delete(state.connectionFailed, token) |
|
|
|
|
|
} |
|
|
if (flags === PARTICIPANT.CALL_FLAG.DISCONNECTED) { |
|
|
if (flags === PARTICIPANT.CALL_FLAG.DISCONNECTED) { |
|
|
if (state.inCall[token] && state.inCall[token][sessionId]) { |
|
|
if (state.inCall[token] && state.inCall[token][sessionId]) { |
|
|
Vue.delete(state.inCall[token], sessionId) |
|
|
Vue.delete(state.inCall[token], sessionId) |
|
@ -330,6 +338,13 @@ const mutations = { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
connectionFailed(state, { token }) { |
|
|
|
|
|
if (!state.connectionFailed[token]) { |
|
|
|
|
|
Vue.set(state.connectionFailed, token, {}) |
|
|
|
|
|
} |
|
|
|
|
|
Vue.set(state.connectionFailed[token], 'self', 'failed') |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
finishedConnecting(state, { token, sessionId }) { |
|
|
finishedConnecting(state, { token, sessionId }) { |
|
|
if (state.connecting[token] && state.connecting[token][sessionId]) { |
|
|
if (state.connecting[token] && state.connecting[token][sessionId]) { |
|
|
Vue.delete(state.connecting[token], sessionId) |
|
|
Vue.delete(state.connecting[token], sessionId) |
|
|