Skip to content

Commit

Permalink
Merge pull request #508 from AI4Bharat/feature_for_not_allowing_voice…
Browse files Browse the repository at this point in the history
…over_time_change_and_add_new_box

added feature to not allow voiceover time change and new subtitle box
  • Loading branch information
AlpanaMajhi authored Nov 8, 2023
2 parents 6b80a8d + f2c59e4 commit ba768bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/containers/Organization/Video/components/Metronome.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const findIndex = (subs, startTime) => {

export default React.memo(
function Component({ render, playing }) {
const taskDetails = useSelector((state) => state.getTaskDetails.data);
const classes = VideoLandingStyle();
const dispatch = useDispatch();

Expand All @@ -52,6 +53,7 @@ export default React.memo(
const onMouseDown = useCallback(
(event) => {
if (event.button !== 0) return;
if (taskDetails.task_type.includes("VOICEOVER")){return}
const clickTime = getEventTime(event);
setIsDroging(true);
setDrogStartTime(clickTime);
Expand All @@ -61,6 +63,7 @@ export default React.memo(

const onMouseMove = useCallback(
(event) => {
if (taskDetails.task_type.includes("VOICEOVER")){return}
if (isDroging) {
if (playing) player.pause();
setDrogEndTime(getEventTime(event));
Expand All @@ -70,6 +73,7 @@ export default React.memo(
);

const onDocumentMouseUp = useCallback(() => {
if (taskDetails.task_type.includes("VOICEOVER")){return}
if (isDroging) {
if (
drogStartTime > 0 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export default memo(
const copySub = [...subtitles];

if (index <= 0) return;
if (taskDetails.task_type.includes("VOICEOVER")){return}

Object.assign(sub, obj);

Expand Down

0 comments on commit ba768bf

Please sign in to comment.