|
| 1 | +import React from 'react'; |
| 2 | +import { Alert, Box, Chip, Container, Stack, Typography } from '@mui/material'; |
| 3 | +import { makeStyles } from '@mui/styles'; |
| 4 | +import LiveTvIcon from '@mui/icons-material/LiveTv'; |
| 5 | + |
| 6 | +const useStyles = makeStyles(() => ({ |
| 7 | + page: { |
| 8 | + minHeight: '100vh', |
| 9 | + background: 'linear-gradient(180deg, #e0f2fe 0%, #f8fafc 100%)', |
| 10 | + padding: '2.5rem 1.25rem 4rem', |
| 11 | + position: 'relative', |
| 12 | + overflow: 'hidden', |
| 13 | + }, |
| 14 | + heading: { |
| 15 | + color: '#0f172a', |
| 16 | + fontWeight: 800, |
| 17 | + }, |
| 18 | + subheading: { |
| 19 | + color: '#475569', |
| 20 | + lineHeight: 1.6, |
| 21 | + }, |
| 22 | + theatreFrame: { |
| 23 | + width: '100%', |
| 24 | + minHeight: 540, |
| 25 | + borderRadius: 24, |
| 26 | + border: '1px solid #dbeafe', |
| 27 | + background: 'linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%)', |
| 28 | + boxShadow: '0 4px 14px rgba(15, 23, 42, 0.06)', |
| 29 | + display: 'flex', |
| 30 | + alignItems: 'center', |
| 31 | + justifyContent: 'center', |
| 32 | + position: 'relative', |
| 33 | + overflow: 'hidden', |
| 34 | + '@media (max-width: 900px)': { |
| 35 | + minHeight: 390, |
| 36 | + }, |
| 37 | + '@media (max-width: 600px)': { |
| 38 | + minHeight: 280, |
| 39 | + borderRadius: 18, |
| 40 | + }, |
| 41 | + }, |
| 42 | + scanLines: { |
| 43 | + position: 'absolute', |
| 44 | + inset: 0, |
| 45 | + background: |
| 46 | + 'repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.12) 0px, rgba(148, 163, 184, 0.12) 1px, transparent 1px, transparent 6px)', |
| 47 | + pointerEvents: 'none', |
| 48 | + }, |
| 49 | + placeholderCard: { |
| 50 | + width: 'min(90%, 820px)', |
| 51 | + borderRadius: 18, |
| 52 | + background: '#ffffff', |
| 53 | + border: '1px solid #dbeafe', |
| 54 | + padding: '2.5rem 1.75rem', |
| 55 | + textAlign: 'center', |
| 56 | + boxShadow: '0 10px 24px rgba(15, 23, 42, 0.08)', |
| 57 | + zIndex: 2, |
| 58 | + '@media (max-width: 600px)': { |
| 59 | + padding: '1.5rem 1rem', |
| 60 | + }, |
| 61 | + }, |
| 62 | + icon: { |
| 63 | + fontSize: '3rem', |
| 64 | + color: '#1d4ed8', |
| 65 | + marginBottom: '0.8rem', |
| 66 | + }, |
| 67 | + placeholderTitle: { |
| 68 | + color: '#0f172a', |
| 69 | + fontWeight: 700, |
| 70 | + marginBottom: '0.75rem', |
| 71 | + }, |
| 72 | + placeholderText: { |
| 73 | + color: '#475569', |
| 74 | + lineHeight: 1.7, |
| 75 | + marginBottom: '1.25rem', |
| 76 | + }, |
| 77 | +})); |
| 78 | + |
| 79 | +function Stream() { |
| 80 | + const classes = useStyles(); |
| 81 | + |
| 82 | + return ( |
| 83 | + <Box className={classes.page}> |
| 84 | + <Container maxWidth='lg'> |
| 85 | + <Stack spacing={0.5} sx={{ mb: 3 }}> |
| 86 | + <Typography variant='h4' component='h1' className={classes.heading}> |
| 87 | + Stream |
| 88 | + </Typography> |
| 89 | + <Typography className={classes.subheading}> |
| 90 | + View live Pixel Streaming output for your simulation runs. This player area will switch |
| 91 | + from offline placeholder to live feed when the stream service is connected. |
| 92 | + </Typography> |
| 93 | + </Stack> |
| 94 | + |
| 95 | + <Box className={classes.theatreFrame}> |
| 96 | + <Box className={classes.scanLines} /> |
| 97 | + <Box className={classes.placeholderCard}> |
| 98 | + <LiveTvIcon className={classes.icon} /> |
| 99 | + <Typography variant='h5' component='h2' className={classes.placeholderTitle}> |
| 100 | + Stream Offline |
| 101 | + </Typography> |
| 102 | + <Typography className={classes.placeholderText}> |
| 103 | + Pixel Streaming is currently unavailable. Start the simulator and connect the stream |
| 104 | + backend to activate this player. |
| 105 | + </Typography> |
| 106 | + <Stack direction='row' spacing={1} justifyContent='center' sx={{ mb: 2 }}> |
| 107 | + <Chip label='Pixel Streaming' color='primary' variant='outlined' size='small' /> |
| 108 | + <Chip label='Status: Offline' color='warning' variant='outlined' size='small' /> |
| 109 | + </Stack> |
| 110 | + <Alert severity='info' variant='outlined' sx={{ textAlign: 'left' }}> |
| 111 | + When online, this area will render the simulator video stream in this same frame. |
| 112 | + </Alert> |
| 113 | + </Box> |
| 114 | + </Box> |
| 115 | + </Container> |
| 116 | + </Box> |
| 117 | + ); |
| 118 | +} |
| 119 | + |
| 120 | +export default Stream; |
0 commit comments