mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add remote play menu to experimental layout
This commit is contained in:
parent
4397e4c724
commit
7ca3fcb8eb
7 changed files with 425 additions and 1 deletions
38
src/apps/experimental/components/PlayTargetIcon.tsx
Normal file
38
src/apps/experimental/components/PlayTargetIcon.tsx
Normal file
|
@ -0,0 +1,38 @@
|
|||
import React from 'react';
|
||||
import Cast from '@mui/icons-material/Cast';
|
||||
import Computer from '@mui/icons-material/Computer';
|
||||
import Devices from '@mui/icons-material/Devices';
|
||||
import Smartphone from '@mui/icons-material/Smartphone';
|
||||
import Tablet from '@mui/icons-material/Tablet';
|
||||
import Tv from '@mui/icons-material/Tv';
|
||||
|
||||
import browser from 'scripts/browser';
|
||||
import type { PlayTarget } from 'types/playTarget';
|
||||
|
||||
const PlayTargetIcon = ({ target }: { target: PlayTarget }) => {
|
||||
if (!target.deviceType && target.isLocalPlayer) {
|
||||
if (browser.tv) {
|
||||
return <Tv />;
|
||||
} else if (browser.mobile) {
|
||||
return <Smartphone />;
|
||||
}
|
||||
return <Computer />;
|
||||
}
|
||||
|
||||
switch (target.deviceType) {
|
||||
case 'smartphone':
|
||||
return <Smartphone />;
|
||||
case 'tablet':
|
||||
return <Tablet />;
|
||||
case 'desktop':
|
||||
return <Computer />;
|
||||
case 'cast':
|
||||
return <Cast />;
|
||||
case 'tv':
|
||||
return <Tv />;
|
||||
default:
|
||||
return <Devices />;
|
||||
}
|
||||
};
|
||||
|
||||
export default PlayTargetIcon;
|
Loading…
Add table
Add a link
Reference in a new issue