indicator for the shortcuts

This commit is contained in:
Arjun Patel
2022-01-15 22:27:01 -08:00
parent ed02ce0cd7
commit 144f01b61a
2 changed files with 9 additions and 2 deletions
+5
View File
@@ -205,6 +205,11 @@ export default function TeamVoiceLine() {
<span className="text-sm text-white font-bold">
{tmember.nickName}
</span>
<span className="text-white shadow-xl font-bold px-3 py-1 rounded">
{/* keyboard shortcuts start from 1 */}
{i + 1}
</span>
</span>
<span className={"text-xs span-sans text-gray-300"}>
+4 -2
View File
@@ -223,13 +223,15 @@ export default function AudioContextProvider({ children }) {
console.log(selectedTeammate);
// recording
if (event.keyCode == KeyCode.R && selectedTeammate) {
if (event.keyCode == KeyCode.R) {
if (!audioInputDeviceId) {
toast.error("No microphone selected");
} else if (!hasRecPermit) {
toast.error("You did not allow recording permission!");
} else if (isMuted) {
toast.error("You are muted, sorry!");
toast.error("You are muted!");
} else if (!selectedTeammate) {
toast.error("Please select a team member or announcements first");
} else {
console.log("started recording");
setIsRecording(true);