diff options
author | Renard | 2020-03-08 18:04:24 -0300 |
---|---|---|
committer | Renard | 2020-03-08 18:04:24 -0300 |
commit | d647b3e6628d76dbe207ce5991335c30787a8a6d (patch) | |
tree | 7881d6a43398a01b20a7e60c2e21b8d3b082b87c /src/StreamInfo.js | |
download | bairadio-app-d647b3e6628d76dbe207ce5991335c30787a8a6d.tar.gz bairadio-app-d647b3e6628d76dbe207ce5991335c30787a8a6d.tar.xz bairadio-app-d647b3e6628d76dbe207ce5991335c30787a8a6d.zip |
First commit
Diffstat (limited to 'src/StreamInfo.js')
-rw-r--r-- | src/StreamInfo.js | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/StreamInfo.js b/src/StreamInfo.js new file mode 100644 index 0000000..fd88150 --- /dev/null +++ b/src/StreamInfo.js @@ -0,0 +1,62 @@ +import React from "react"; +import { List } from "semantic-ui-react"; +import Moment from "react-moment"; +import "moment/locale/es"; + +const StreamInfo = props => { + const { stream } = props; + return ( + <> + <List> + <List.Item> + <List.Icon name="users" /> + <List.Content> + <List.Header>{`Usuarios escuchando: ${stream.listeners}`}</List.Header> + </List.Content> + </List.Item> + <List.Item> + <List.Icon name="clock" /> + <List.Content> + <List.Header> + Transmitiendo{" "} + <Moment date={stream.stream_start} fromNow locale="es" /> + </List.Header> + </List.Content> + </List.Item> + <List.Item> + <List.Icon name="info" verticalAlign="middle" /> + <List.Content> + <List.Header>{stream.server_name}</List.Header> + {stream.server_description} + </List.Content> + </List.Item> + <List.Item> + <List.Icon name="file audio outline" verticalAlign="middle" /> + <List.Content> + <List.Header> + {stream.audio_channels === 2 ? "Stereo" : "Mono"} + </List.Header> + {`Bitrate: ${stream["ice-bitrate"]} kbps, ${stream["ice-samplerate"]} Hz`} + </List.Content> + </List.Item> + <List.Item> + <List.Icon name="sound" verticalAlign="middle" /> + <List.Content> + <List.Header>CanciĆ³n actual</List.Header> + {`${stream.artist} - ${stream.title}`} + </List.Content> + </List.Item> + </List> + <a + href={`${stream.listenurl.replace( + "http://bienvenidoainternet.org:8000", + "https://bienvenidoainternet.org:8443" + )}.m3u`} + > + Descargar archivo m3u + </a> + </> + ); +}; + +export default StreamInfo; |