Add display stream icon

This commit is contained in:
Michal Szczepanski 2020-03-14 12:18:19 +01:00
parent 39049beba7
commit 428a7531d8
3 changed files with 13 additions and 4 deletions

@ -9,9 +9,9 @@ playlistcast ( work in progress )
* [x] Play / pause / back and forward 30 seconds * [x] Play / pause / back and forward 30 seconds
* [x] Video playback time, duration and seek bar * [x] Video playback time, duration and seek bar
* [x] Video subtitle pick, disable * [x] Video subtitle pick, disable
* [x] Display stream icon if available
### TODO ### TODO
* [ ] Display stream icon if available
* [ ] Pick m3u file and assign to device ( TODO ui ) * [ ] Pick m3u file and assign to device ( TODO ui )
* [ ] Play m3u file with interactive ui * [ ] Play m3u file with interactive ui
* [ ] Display interactive playlist * [ ] Display interactive playlist

@ -13,7 +13,8 @@ query {
port, port,
status { status {
volumeLevel, volumeLevel,
volumeMuted volumeMuted,
iconUrl
}, },
mediaController { mediaController {
appId, appId,

@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Button, Card } from 'antd'; import { Avatar, Button, Card } from 'antd';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faPlayCircle, faPauseCircle, faClosedCaptioning } from '@fortawesome/free-regular-svg-icons'; import { faPlayCircle, faPauseCircle, faClosedCaptioning } from '@fortawesome/free-regular-svg-icons';
import { faRedo, faUndo, faVolumeUp } from '@fortawesome/free-solid-svg-icons'; import { faRedo, faUndo, faVolumeUp } from '@fortawesome/free-solid-svg-icons';
@ -152,7 +152,15 @@ const ChromecastDevice = ({ device }) => {
); );
} }
return ( return (
<Card title={device.name}> <Card title={
(
<span>
<Avatar src={castStatus.iconUrl} />
<span style={{ marginLeft: '10px' }}>{device.name}</span>
</span>
)
}
>
<div> <div>
<p>{name}</p> <p>{name}</p>
{component} {component}