Skip to content

Commit

Permalink
coverted bool to string
Browse files Browse the repository at this point in the history
  • Loading branch information
AlpanaMajhi committed Dec 1, 2023
1 parent b218a21 commit 4db3ae6
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions src/common/VideoDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,34 +269,35 @@ const VideoDialog = ({ open, handleClose, videoDetails }) => {
}
};

useEffect(() => {
const handleKeyDown = (e) => {
if (
e.which === 32 &&
e.target.id !== "description" &&
document.activeElement !== ref.current
) {
e.preventDefault();
var video = document.getElementById("myBtn");
if (video.paused) {
video.play();
} else {
video.pause();
}
}
};
window.addEventListener("keydown", handleKeyDown);
return () => {
window.removeEventListener("keydown", handleKeyDown);
};
}, []);
// useEffect(() => {
// const handleKeyDown = (e) => {
// if (
// e.which === 32 &&
// e.target.id !== "description" &&
// document.activeElement !== ref.current
// ) {
// e.preventDefault();
// var video = document.getElementById("myBtn");
// if (video.paused) {
// video.play();
// } else {
// video.pause();
// }
// }
// };
// window.addEventListener("keydown", handleKeyDown);
// return () => {
// window.removeEventListener("keydown", handleKeyDown);
// };
// }, []);

const updateVideoHandler = async () => {
const updateData = {
gender: voice,
description: videoDescription,
video_id: videoDetails[0].id,
multiple_speaker: speakerType !== 'individual',
// multiple_speaker: speakerType !== 'individual',
multiple_speaker: String(speakerType !== 'individual'),
speaker_info: speakerInfo
};

Expand Down

0 comments on commit 4db3ae6

Please sign in to comment.