commit 60b77a3c99cfbccf291c1da0b446ed111f77cc6e Author: ale Date: Sat Dec 13 02:38:29 2025 +0100 initial commit Signed-off-by: ale diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a45cce9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* +*.lock +*-lock.json \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..02d8f57 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# 📻 Stream Radio + +## A simple radio streaming react app \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..cc06b0d --- /dev/null +++ b/package.json @@ -0,0 +1,43 @@ +{ + "name": "stream-radio", + "version": "0.1.0", + "private": true, + "dependencies": { + "@testing-library/dom": "^10.4.0", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.3.0", + "@testing-library/user-event": "^13.5.0", + "materialize-css": "^1.0.0", + "prop-types": "^15.8.1", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "react-materialize": "^3.10.0", + "react-scripts": "5.0.1", + "sass": "^1.89.0", + "web-vitals": "^2.1.4" + }, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject" + }, + "eslintConfig": { + "extends": [ + "react-app", + "react-app/jest" + ] + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } +} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..c7d380e Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..9cb9c7a --- /dev/null +++ b/public/index.html @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + Stream Radio + + + +
+ + + diff --git a/public/logo192.png b/public/logo192.png new file mode 100644 index 0000000..bd702e8 Binary files /dev/null and b/public/logo192.png differ diff --git a/public/logo512.png b/public/logo512.png new file mode 100644 index 0000000..fdc54af Binary files /dev/null and b/public/logo512.png differ diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..bb904fa --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,26 @@ +{ + "short_name": "Stream Radio", + "name": "Stream Radio", + "description": "A simple radio streaming app", + "icons": [ + { + "src": "favicon.ico", + "sizes": "32x32", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..e9e57dc --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/public/wallpapers/pexels-baskincreativeco-1480807.jpg b/public/wallpapers/pexels-baskincreativeco-1480807.jpg new file mode 100644 index 0000000..0d6eebe Binary files /dev/null and b/public/wallpapers/pexels-baskincreativeco-1480807.jpg differ diff --git a/public/wallpapers/pexels-belle-co-99483-847393.jpg b/public/wallpapers/pexels-belle-co-99483-847393.jpg new file mode 100644 index 0000000..703d774 Binary files /dev/null and b/public/wallpapers/pexels-belle-co-99483-847393.jpg differ diff --git a/public/wallpapers/pexels-bess-hamiti-83687-36487.jpg b/public/wallpapers/pexels-bess-hamiti-83687-36487.jpg new file mode 100644 index 0000000..e5329c1 Binary files /dev/null and b/public/wallpapers/pexels-bess-hamiti-83687-36487.jpg differ diff --git a/public/wallpapers/pexels-carlos-oliva-1966452-3586966.jpg b/public/wallpapers/pexels-carlos-oliva-1966452-3586966.jpg new file mode 100644 index 0000000..aff4118 Binary files /dev/null and b/public/wallpapers/pexels-carlos-oliva-1966452-3586966.jpg differ diff --git a/public/wallpapers/pexels-christian-heitz-285904-842711.jpg b/public/wallpapers/pexels-christian-heitz-285904-842711.jpg new file mode 100644 index 0000000..9b8fdb3 Binary files /dev/null and b/public/wallpapers/pexels-christian-heitz-285904-842711.jpg differ diff --git a/public/wallpapers/pexels-dreamypixel-547115.jpg b/public/wallpapers/pexels-dreamypixel-547115.jpg new file mode 100644 index 0000000..a9af0d7 Binary files /dev/null and b/public/wallpapers/pexels-dreamypixel-547115.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-1062249.jpg b/public/wallpapers/pexels-eberhardgross-1062249.jpg new file mode 100644 index 0000000..4812bc1 Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-1062249.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-1287075.jpg b/public/wallpapers/pexels-eberhardgross-1287075.jpg new file mode 100644 index 0000000..619ceda Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-1287075.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-1287089.jpg b/public/wallpapers/pexels-eberhardgross-1287089.jpg new file mode 100644 index 0000000..0da9c8a Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-1287089.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-1301976.jpg b/public/wallpapers/pexels-eberhardgross-1301976.jpg new file mode 100644 index 0000000..9237b4c Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-1301976.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-1367192(1).jpg b/public/wallpapers/pexels-eberhardgross-1367192(1).jpg new file mode 100644 index 0000000..d6b52f3 Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-1367192(1).jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-1367192.jpg b/public/wallpapers/pexels-eberhardgross-1367192.jpg new file mode 100644 index 0000000..d6b52f3 Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-1367192.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-1612351.jpg b/public/wallpapers/pexels-eberhardgross-1612351.jpg new file mode 100644 index 0000000..9cedefa Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-1612351.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-1612360.jpg b/public/wallpapers/pexels-eberhardgross-1612360.jpg new file mode 100644 index 0000000..763b26b Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-1612360.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-1612362.jpg b/public/wallpapers/pexels-eberhardgross-1612362.jpg new file mode 100644 index 0000000..47551fe Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-1612362.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-1612371.jpg b/public/wallpapers/pexels-eberhardgross-1612371.jpg new file mode 100644 index 0000000..474bb24 Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-1612371.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-1624255.jpg b/public/wallpapers/pexels-eberhardgross-1624255.jpg new file mode 100644 index 0000000..011d029 Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-1624255.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-534164.jpg b/public/wallpapers/pexels-eberhardgross-534164.jpg new file mode 100644 index 0000000..b315ee7 Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-534164.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-629167.jpg b/public/wallpapers/pexels-eberhardgross-629167.jpg new file mode 100644 index 0000000..e68db4f Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-629167.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-691668.jpg b/public/wallpapers/pexels-eberhardgross-691668.jpg new file mode 100644 index 0000000..5f5ec7d Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-691668.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-707344.jpg b/public/wallpapers/pexels-eberhardgross-707344.jpg new file mode 100644 index 0000000..566ae3a Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-707344.jpg differ diff --git a/public/wallpapers/pexels-eberhardgross-730981.jpg b/public/wallpapers/pexels-eberhardgross-730981.jpg new file mode 100644 index 0000000..7a4790e Binary files /dev/null and b/public/wallpapers/pexels-eberhardgross-730981.jpg differ diff --git a/public/wallpapers/pexels-esan-2085998.jpg b/public/wallpapers/pexels-esan-2085998.jpg new file mode 100644 index 0000000..b6e5a8a Binary files /dev/null and b/public/wallpapers/pexels-esan-2085998.jpg differ diff --git a/public/wallpapers/pexels-fotios-photos-109260.jpg b/public/wallpapers/pexels-fotios-photos-109260.jpg new file mode 100644 index 0000000..5e50799 Binary files /dev/null and b/public/wallpapers/pexels-fotios-photos-109260.jpg differ diff --git a/public/wallpapers/pexels-francesco-ungaro-1525041.jpg b/public/wallpapers/pexels-francesco-ungaro-1525041.jpg new file mode 100644 index 0000000..86fef4a Binary files /dev/null and b/public/wallpapers/pexels-francesco-ungaro-1525041.jpg differ diff --git a/public/wallpapers/pexels-gochrisgoxyz-1477166.jpg b/public/wallpapers/pexels-gochrisgoxyz-1477166.jpg new file mode 100644 index 0000000..4e75816 Binary files /dev/null and b/public/wallpapers/pexels-gochrisgoxyz-1477166.jpg differ diff --git a/public/wallpapers/pexels-johnnoibn-1448136.jpg b/public/wallpapers/pexels-johnnoibn-1448136.jpg new file mode 100644 index 0000000..4a825b5 Binary files /dev/null and b/public/wallpapers/pexels-johnnoibn-1448136.jpg differ diff --git a/public/wallpapers/pexels-joshkjack-135018.jpg b/public/wallpapers/pexels-joshkjack-135018.jpg new file mode 100644 index 0000000..25b6893 Binary files /dev/null and b/public/wallpapers/pexels-joshkjack-135018.jpg differ diff --git a/public/wallpapers/pexels-jplenio-1110656.jpg b/public/wallpapers/pexels-jplenio-1110656.jpg new file mode 100644 index 0000000..020ee77 Binary files /dev/null and b/public/wallpapers/pexels-jplenio-1110656.jpg differ diff --git a/public/wallpapers/pexels-jplenio-1146708.jpg b/public/wallpapers/pexels-jplenio-1146708.jpg new file mode 100644 index 0000000..e8e6a01 Binary files /dev/null and b/public/wallpapers/pexels-jplenio-1146708.jpg differ diff --git a/public/wallpapers/pexels-jplenio-1435075.jpg b/public/wallpapers/pexels-jplenio-1435075.jpg new file mode 100644 index 0000000..77f50d7 Binary files /dev/null and b/public/wallpapers/pexels-jplenio-1435075.jpg differ diff --git a/public/wallpapers/pexels-kasperphotography-1042423.jpg b/public/wallpapers/pexels-kasperphotography-1042423.jpg new file mode 100644 index 0000000..55816fc Binary files /dev/null and b/public/wallpapers/pexels-kasperphotography-1042423.jpg differ diff --git a/public/wallpapers/pexels-katja-79053-592077.jpg b/public/wallpapers/pexels-katja-79053-592077.jpg new file mode 100644 index 0000000..a4a75a5 Binary files /dev/null and b/public/wallpapers/pexels-katja-79053-592077.jpg differ diff --git a/public/wallpapers/pexels-lastly-937782.jpg b/public/wallpapers/pexels-lastly-937782.jpg new file mode 100644 index 0000000..aa318ac Binary files /dev/null and b/public/wallpapers/pexels-lastly-937782.jpg differ diff --git a/public/wallpapers/pexels-lilartsy-1213447.jpg b/public/wallpapers/pexels-lilartsy-1213447.jpg new file mode 100644 index 0000000..99b73eb Binary files /dev/null and b/public/wallpapers/pexels-lilartsy-1213447.jpg differ diff --git a/public/wallpapers/pexels-maxfrancis-2246476.jpg b/public/wallpapers/pexels-maxfrancis-2246476.jpg new file mode 100644 index 0000000..5012a27 Binary files /dev/null and b/public/wallpapers/pexels-maxfrancis-2246476.jpg differ diff --git a/public/wallpapers/pexels-mdsnmdsnmdsn-1831234.jpg b/public/wallpapers/pexels-mdsnmdsnmdsn-1831234.jpg new file mode 100644 index 0000000..eb9fa4d Binary files /dev/null and b/public/wallpapers/pexels-mdsnmdsnmdsn-1831234.jpg differ diff --git a/public/wallpapers/pexels-mdx014-814499.jpg b/public/wallpapers/pexels-mdx014-814499.jpg new file mode 100644 index 0000000..b606f6e Binary files /dev/null and b/public/wallpapers/pexels-mdx014-814499.jpg differ diff --git a/public/wallpapers/pexels-michal-pech-213601-1632044.jpg b/public/wallpapers/pexels-michal-pech-213601-1632044.jpg new file mode 100644 index 0000000..dbaa0ed Binary files /dev/null and b/public/wallpapers/pexels-michal-pech-213601-1632044.jpg differ diff --git a/public/wallpapers/pexels-no-name-14543-66997.jpg b/public/wallpapers/pexels-no-name-14543-66997.jpg new file mode 100644 index 0000000..9006c98 Binary files /dev/null and b/public/wallpapers/pexels-no-name-14543-66997.jpg differ diff --git a/public/wallpapers/pexels-pixabay-158063.jpg b/public/wallpapers/pexels-pixabay-158063.jpg new file mode 100644 index 0000000..5e7a38a Binary files /dev/null and b/public/wallpapers/pexels-pixabay-158063.jpg differ diff --git a/public/wallpapers/pexels-pixabay-33109(1).jpg b/public/wallpapers/pexels-pixabay-33109(1).jpg new file mode 100644 index 0000000..7813b99 Binary files /dev/null and b/public/wallpapers/pexels-pixabay-33109(1).jpg differ diff --git a/public/wallpapers/pexels-pixabay-33109.jpg b/public/wallpapers/pexels-pixabay-33109.jpg new file mode 100644 index 0000000..7813b99 Binary files /dev/null and b/public/wallpapers/pexels-pixabay-33109.jpg differ diff --git a/public/wallpapers/pexels-pixabay-33545.jpg b/public/wallpapers/pexels-pixabay-33545.jpg new file mode 100644 index 0000000..1a93cee Binary files /dev/null and b/public/wallpapers/pexels-pixabay-33545.jpg differ diff --git a/public/wallpapers/pexels-pixabay-358532.jpg b/public/wallpapers/pexels-pixabay-358532.jpg new file mode 100644 index 0000000..3b7dad1 Binary files /dev/null and b/public/wallpapers/pexels-pixabay-358532.jpg differ diff --git a/public/wallpapers/pexels-pixabay-41004.jpg b/public/wallpapers/pexels-pixabay-41004.jpg new file mode 100644 index 0000000..c1de058 Binary files /dev/null and b/public/wallpapers/pexels-pixabay-41004.jpg differ diff --git a/public/wallpapers/pexels-pixabay-414144.jpg b/public/wallpapers/pexels-pixabay-414144.jpg new file mode 100644 index 0000000..9ee55cd Binary files /dev/null and b/public/wallpapers/pexels-pixabay-414144.jpg differ diff --git a/public/wallpapers/pexels-pixabay-416160.jpg b/public/wallpapers/pexels-pixabay-416160.jpg new file mode 100644 index 0000000..a1dc99c Binary files /dev/null and b/public/wallpapers/pexels-pixabay-416160.jpg differ diff --git a/public/wallpapers/pexels-pixabay-459203.jpg b/public/wallpapers/pexels-pixabay-459203.jpg new file mode 100644 index 0000000..c8f9250 Binary files /dev/null and b/public/wallpapers/pexels-pixabay-459203.jpg differ diff --git a/public/wallpapers/pexels-pixabay-462162.jpg b/public/wallpapers/pexels-pixabay-462162.jpg new file mode 100644 index 0000000..2bb0b54 Binary files /dev/null and b/public/wallpapers/pexels-pixabay-462162.jpg differ diff --git a/public/wallpapers/pexels-pixabay-50594.jpg b/public/wallpapers/pexels-pixabay-50594.jpg new file mode 100644 index 0000000..1e59f03 Binary files /dev/null and b/public/wallpapers/pexels-pixabay-50594.jpg differ diff --git a/public/wallpapers/pexels-pixabay-50686.jpg b/public/wallpapers/pexels-pixabay-50686.jpg new file mode 100644 index 0000000..5e38c98 Binary files /dev/null and b/public/wallpapers/pexels-pixabay-50686.jpg differ diff --git a/public/wallpapers/pexels-pixabay-52500.jpg b/public/wallpapers/pexels-pixabay-52500.jpg new file mode 100644 index 0000000..f139eca Binary files /dev/null and b/public/wallpapers/pexels-pixabay-52500.jpg differ diff --git a/public/wallpapers/pexels-rpnickson-2559941.jpg b/public/wallpapers/pexels-rpnickson-2559941.jpg new file mode 100644 index 0000000..3925ca3 Binary files /dev/null and b/public/wallpapers/pexels-rpnickson-2559941.jpg differ diff --git a/public/wallpapers/pexels-rpnickson-2647990.jpg b/public/wallpapers/pexels-rpnickson-2647990.jpg new file mode 100644 index 0000000..e7b198f Binary files /dev/null and b/public/wallpapers/pexels-rpnickson-2647990.jpg differ diff --git a/public/wallpapers/pexels-samandgos-709552.jpg b/public/wallpapers/pexels-samandgos-709552.jpg new file mode 100644 index 0000000..a95cecf Binary files /dev/null and b/public/wallpapers/pexels-samandgos-709552.jpg differ diff --git a/public/wallpapers/pexels-samkolder-2387873.jpg b/public/wallpapers/pexels-samkolder-2387873.jpg new file mode 100644 index 0000000..ab5942b Binary files /dev/null and b/public/wallpapers/pexels-samkolder-2387873.jpg differ diff --git a/public/wallpapers/pexels-sebastian-312105.jpg b/public/wallpapers/pexels-sebastian-312105.jpg new file mode 100644 index 0000000..48826ce Binary files /dev/null and b/public/wallpapers/pexels-sebastian-312105.jpg differ diff --git a/public/wallpapers/pexels-simon73-1183099.jpg b/public/wallpapers/pexels-simon73-1183099.jpg new file mode 100644 index 0000000..dc10d37 Binary files /dev/null and b/public/wallpapers/pexels-simon73-1183099.jpg differ diff --git a/public/wallpapers/pexels-souvenirpixels-1519088.jpg b/public/wallpapers/pexels-souvenirpixels-1519088.jpg new file mode 100644 index 0000000..7536681 Binary files /dev/null and b/public/wallpapers/pexels-souvenirpixels-1519088.jpg differ diff --git a/public/wallpapers/pexels-souvenirpixels-417074.jpg b/public/wallpapers/pexels-souvenirpixels-417074.jpg new file mode 100644 index 0000000..af09156 Binary files /dev/null and b/public/wallpapers/pexels-souvenirpixels-417074.jpg differ diff --git a/public/wallpapers/pexels-stefanstefancik-919606.jpg b/public/wallpapers/pexels-stefanstefancik-919606.jpg new file mode 100644 index 0000000..d19f616 Binary files /dev/null and b/public/wallpapers/pexels-stefanstefancik-919606.jpg differ diff --git a/public/wallpapers/pexels-stywo-1054289.jpg b/public/wallpapers/pexels-stywo-1054289.jpg new file mode 100644 index 0000000..3ee8abd Binary files /dev/null and b/public/wallpapers/pexels-stywo-1054289.jpg differ diff --git a/public/wallpapers/pexels-stywo-1668246.jpg b/public/wallpapers/pexels-stywo-1668246.jpg new file mode 100644 index 0000000..bb10b83 Binary files /dev/null and b/public/wallpapers/pexels-stywo-1668246.jpg differ diff --git a/public/wallpapers/pexels-therato-1933239.jpg b/public/wallpapers/pexels-therato-1933239.jpg new file mode 100644 index 0000000..35941d1 Binary files /dev/null and b/public/wallpapers/pexels-therato-1933239.jpg differ diff --git a/public/wallpapers/pexels-todd-trapani-488382-1198817.jpg b/public/wallpapers/pexels-todd-trapani-488382-1198817.jpg new file mode 100644 index 0000000..4a666c1 Binary files /dev/null and b/public/wallpapers/pexels-todd-trapani-488382-1198817.jpg differ diff --git a/public/wallpapers/pexels-umaraffan499-21787.jpg b/public/wallpapers/pexels-umaraffan499-21787.jpg new file mode 100644 index 0000000..73776e8 Binary files /dev/null and b/public/wallpapers/pexels-umaraffan499-21787.jpg differ diff --git a/src/App.css b/src/App.css new file mode 100644 index 0000000..25af851 --- /dev/null +++ b/src/App.css @@ -0,0 +1,115 @@ +body { + text-align: center; + color: white; + background-position: center center; + background-repeat: no-repeat; + background-attachment: fixed; + background-size: cover; +} + +h1 { + padding-top: 16vh; + font-size: 4rem; +} + +h1 a { + color: inherit; + text-decoration: none; + cursor: pointer; + display: inline-block; +} + +h1 a:hover { + opacity: 0.8; + transition: opacity 0.3s ease; +} + +h4 { + margin: 0 auto; + overflow: hidden; + background-color: rgba(255, 255, 255, 0.3); + transition: 0.3s; + width: 85%; + font-size: x-large; + backdrop-filter: blur(10px); + border-radius: 10px; +} + +h4:hover { + width: 95%; +} + +.bounce a { + border-bottom: 1px solid white; +} + +.bounce { + animation: marquee 10s linear infinite; +} + +.bounce:hover { + animation-play-state: paused; +} + +a, +a:visited, +a:active, +a:hover { + color: white; + text-shadow: 0 0 5px #000; + text-decoration: none; + cursor: pointer; +} + +@keyframes marquee { + 0% { + transform: translateX(100vw); + } + + 100% { + transform: translateX(-100%); + } +} + +audio { + display: none; +} + +.player { + width: 26rem; + margin: 0 auto; + padding: 1rem; + border-radius: 10px; +} + +input[type="range"], +input[type="range"]::-moz-range-thumb, +input[type="range"]::-webkit-slider-runnable-track, +input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + cursor: pointer; + border: none; + margin: 0; +} + +input[type="range"]::-moz-range-thumb, +input[type="range"]::-webkit-slider-thumb, +input[type=range]+.thumb, +.thumb { + background-color: #795548 !important; +} + +input[type="range"], +input[type="range"]::-webkit-slider-runnable-track { + background-color: #4e342e !important; +} + +.range-field { + vertical-align: middle;; + margin: 0 auto; + display: inline-block; + width: 6rem !important; + border: 0; + color: white; +} \ No newline at end of file diff --git a/src/App.js b/src/App.js new file mode 100644 index 0000000..0c4d0f1 --- /dev/null +++ b/src/App.js @@ -0,0 +1,114 @@ +import "./App.css"; +import { useEffect, useRef } from "react"; +import WaveForm from "./WaveForm"; +import M from "materialize-css"; +import text from "./list.txt"; + +// Custom hooks +import useAudioPlayer from "./hooks/useAudioPlayer"; +import useStreamData from "./hooks/useStreamData"; +import useBackgroundImages from "./hooks/useBackgroundImages"; + +// Components +import Header from "./components/Header"; +import TrackInfo from "./components/TrackInfo"; +import AudioControls from "./components/AudioControls"; + +/** + * Main App component + */ +const App = () => { + // Custom hook for managing background images + const { loadImages } = useBackgroundImages(text); + + // Custom hook for streaming data + const { + currentListeners, + maxListeners, + title, + link, + trackInfo, + loadAllData + } = useStreamData(); + + // Custom hook for audio player functionality + const { + audioElmRef, + analyzerData, + currentVolume, + muted, + paused, + play, + pause, + toggleMute + } = useAudioPlayer(); + + // Initialization flag to prevent multiple initializations + const initialized = useRef(false); + + // Initialize app and setup periodic data refresh + useEffect(() => { + if (initialized.current) return; + initialized.current = true; + + // Initialize Materialize components + M.AutoInit(); + + // Load initial data + loadAllData(); + loadImages(); + + // Set up periodic data refresh + const dataRefreshInterval = setInterval(() => { + loadAllData(); + }, (Math.floor(Math.random() * 20) + 10) * 1000); + + // Set up periodic background image refresh + const imageRefreshInterval = setInterval(() => { + loadImages(); + }, (Math.floor(Math.random() * 60) + 90) * 1000); + + // Cleanup function + return () => { + clearInterval(dataRefreshInterval); + clearInterval(imageRefreshInterval); + }; + }, [loadAllData, loadImages]); + + return ( + <> +
+ + {analyzerData && } + + + +

+ + + +