File size: 1,483 Bytes
2bd3674
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import {
  Button,
  Dialog,
  DialogContent,
  DialogTitle,
  IconButton,
  Typography,
} from '@mui/material';
import CloseIcon from '@mui/icons-material/Close';
import XRConfig, {XRConfigProps} from './XRConfig';
import {useState} from 'react';
import './XRDialog.css';

export default function XRDialog(props: XRConfigProps) {
  const [isDialogOpen, setIsDialogOpen] = useState<boolean>(false);
  return (
    <>
      <Button variant="contained" onClick={() => setIsDialogOpen(true)}>
        Enter AR Experience
      </Button>
      <Dialog onClose={() => setIsDialogOpen(false)} open={isDialogOpen}>
        <DialogTitle sx={{m: 0, p: 2}} className="xr-dialog-text-center">
          FAIR Seamless Streaming Demo
        </DialogTitle>
        <IconButton
          aria-label="close"
          onClick={() => setIsDialogOpen(false)}
          sx={{
            position: 'absolute',
            right: 8,
            top: 8,
            color: (theme) => theme.palette.grey[500],
          }}>
          <CloseIcon />
        </IconButton>
        <DialogContent
          dividers
          className="xr-dialog-container xr-dialog-text-center">
          <Typography gutterBottom>
            Welcome to the Seamless team streaming demo experience! In this demo
            you will experience AI powered text and audio translation in real
            time.
          </Typography>
          <XRConfig {...props} />
        </DialogContent>
      </Dialog>
    </>
  );
}