adding controlling for the silence mode
This commit is contained in:
@@ -250,11 +250,12 @@ export default function AudioContextProvider({ children }) {
|
|||||||
toast.error("No microphone selected");
|
toast.error("No microphone selected");
|
||||||
} else if (!hasRecPermit) {
|
} else if (!hasRecPermit) {
|
||||||
toast.error("You did not allow recording permission!");
|
toast.error("You did not allow recording permission!");
|
||||||
} else if (isMuted) {
|
|
||||||
toast.error("You are muted!");
|
|
||||||
} else if (!selectedTeammate) {
|
} else if (!selectedTeammate) {
|
||||||
toast.error("Please select a team member or announcements first");
|
toast.error("Please select a team member or announcements first");
|
||||||
|
} else if (isMuted) {
|
||||||
|
toast.error("You are muted!");
|
||||||
} else {
|
} else {
|
||||||
|
// alright now you are good to go
|
||||||
console.log("started recording");
|
console.log("started recording");
|
||||||
setIsRecording(true);
|
setIsRecording(true);
|
||||||
startRecording();
|
startRecording();
|
||||||
@@ -266,7 +267,12 @@ export default function AudioContextProvider({ children }) {
|
|||||||
} else if (event.keyCode == KeyCode.Escape) {
|
} else if (event.keyCode == KeyCode.Escape) {
|
||||||
setSelectedTeamMember(null);
|
setSelectedTeamMember(null);
|
||||||
} else if (event.keyCode == KeyCode.Space) {
|
} else if (event.keyCode == KeyCode.Space) {
|
||||||
setStartPlaying(true);
|
if (isSilenceMode) {
|
||||||
|
toast.error("you are in silence mode, please disable it first");
|
||||||
|
} else {
|
||||||
|
// alright now you are good to play messages
|
||||||
|
setStartPlaying(true);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
toast("Invalid keyboard shortcut.");
|
toast("Invalid keyboard shortcut.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user