Files
jitsi-meet/react/features/shared-video/components/native/ShareVideoConfirmDialog.tsx
Дамян Минков 3f7c3b8fd2 feat(shared-video): Shows confirmation dialog before playing video. (#15059)
* feat(shared-video): Shows confirmation dialog before playing video.

* feat(shared-video/native): created ShareVideoConfirmDialog and unified actions

* squash: Simplifies state and fixes stop and then start scenario.

* squash: Use constants everywhere.

* squash: Use helper function.

* squash: Ignore any command with not matching video URL.

---------

Co-authored-by: Calin-Teodor <calin.chitu@8x8.com>
2024-08-27 10:45:39 -05:00

39 lines
1.0 KiB
TypeScript

import React from 'react';
import { useTranslation } from 'react-i18next';
import ConfirmDialog from '../../../base/dialog/components/native/ConfirmDialog';
import { DialogProps } from '../../../base/dialog/constants';
interface IProps extends DialogProps {
/**
* The name of the remote participant that shared the video.
*/
actorName: string;
/**
* The function to execute when confirmed.
*/
onSubmit: () => void;
}
/**
* Dialog to confirm playing a video shared from a remote participant.
*
* @returns {JSX.Element}
*/
export default function ShareVideoConfirmDialog({ actorName, onSubmit }: IProps): JSX.Element {
const { t } = useTranslation();
return (
<ConfirmDialog
cancelLabel = 'dialog.Cancel'
confirmLabel = 'dialog.Ok'
descriptionKey = 'dialog.shareVideoConfirmPlay'
onSubmit = { onSubmit }
title = { t('dialog.shareVideoConfirmPlayTitle', {
name: actorName
}) } />
);
}