JSFiddle - React, Tailwind, and code Playground
by itsazzad
JavaScript
const CALL_STATUSES = {
Ringing: {
text: 'Ringing...',
actions: [
[
'End',
],
]
},
Incoming: {
text: 'Incoming...',
actions: [
[
'Mute',
'End',
'Message',
'Accept',
],
]
},
Connecting: {
text: 'Connecting...',
actions: [
[
'Mute',
'End',
'Message',
],
]
},
Reconnecting: {
text: 'Reconnecting...',
actions: [
[
'Mute',
'End',
'Message',
],
]
},
Answering: {
text: 'Answering...',
actions: [
[
'Mute',
'End',
'Message',
],
]
},
InCall: {
text: 'InCall',
actions: [
[
'Mute',
'Message',
],
[
'End',
]
]
},
GagaGuguVideo: {
text: 'GagaGuguVideo',
actions: [
[
'Mute',
'End',
'Message',
],
]
},
};
let target = 'GagaGuguVideo';
let activeCallStructure = CALL_STATUSES[target];
CALL_STATUSES['xxx']='ttt';
console.log(CALL_STATUSES);
console.log(activeCallStructure);
console.log(activeCallStructure.actions);