radio4000 / migrate-tool

A website for managing a Radio4000 channel migration, from firebase (realtime) to supabase
https://migrate.radio4000.com/
0 stars 0 forks source link

Player #48

Closed oskarrough closed 2 years ago

oskarrough commented 2 years ago

Adds a new usePlayer() hook that can be used anywhere. Currently it can hold and set a channel and a track but that's mostly for testing. The hook uses context behind the scenes ala https://kentcdodds.com/blog/how-to-use-react-context-effectively. Like this:

https://github.com/radio4000/cms/blob/aa1396564888dc416ae47f7e4f876c6a6d56504a/src/components/player.js#L21-L28

Also adds the <radio4000-player> and renders it into the layout footer for now. Made it sticky as well. Since the player loads data from Firebase we need to consider what to do when data doesn't come from firebase. The setPlaylist method? But couldn't make it work yet..

Closes #21

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/internet4000/cms/Gfxt7jhXuLjcvg79agbNWxGu6tu7
✅ Preview: https://cms-git-feat-player-internet40001.vercel.app

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
cms ✅ Ready (Inspect) Visit Preview Aug 11, 2022 at 8:42PM (UTC)