Coder Social home page Coder Social logo

rgardner / dancingtogether Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 2.09 MB

Listen to music with your friends and family

Home Page: https://www.dancingtogether.live

License: MIT License

Python 37.87% HTML 5.12% Shell 2.35% CSS 0.63% JavaScript 20.94% Makefile 0.64% TypeScript 32.28% Dockerfile 0.18%
music python react spotify typescript webapp

dancingtogether's People

Contributors

azure-pipelines[bot] avatar dependabot[bot] avatar rgardner avatar

Watchers

 avatar  avatar  avatar

dancingtogether's Issues

Move the station JS to TypeScript

  • split into separate js file
  • add typescript compiler to toolchain
  • convert to simple TS file with no semantic changes
  • rewrite in TS

Replace disconnect/connect with mute button

From testing with Nicole, we found that mute is likely good enough. Listeners can always disconnect by closing the browser window. The small mute icon on the tab is also not really discoverable and it's so small it's hard to use for many people.

Font Awesome

<i class="fas fa-volume-off"></i>
<i class="fas fa-volume-up"></i>

Add license

likely MIT, but first read through choosealicense.org

Improve account management

  1. Users should be able to close their accounts and remove all info stored about them
  2. Going to the login page when already logged in should redirect to the homepage
    • going to the join page when already logged in should also redirect
  3. There should be a link to view your account when you're signed in (e.g. put the logout button behind a dropdown).

New account view in menu bar

  • Signed in as {% account name %}
  • Your profile
  • Sign out

Spotify Auth token expires during playback

Spotify auth tokens are usually valid up to 1 hour. This means that if a user listens to the station long enough, the auth token will expire and Spotify will reject the request and currently, the only work-around is to refresh the page - which, is a minor annoyance :)

Instead, here's the proposed flow:

  • continue to init station page with access token at start-up. This allows us to connect to Spotify as soon as it's ready, instead of relying on a websocket call down to the server first.
  • when Spotify rejects the request because the access token has expired, it fires an authentication_error event. Today, only the music player is subscribed to this event to display a message to the user. Instead, that will be moved to the StationServer class, which will listen for this error and issue a "refresh_access_token" command to the server to get a fresh access token (must be done server-side).
  • proposed test: plan is to create a mock spotify endpoint

Unable to build frontend in dev config

ValidationError: ForkTsCheckerWebpackPlugin Invalid Options

options should NOT have additional properties

    at Object.validateOptions [as default] (/Users/bobgardner/Developer/dancingtogether/frontend/node_modules/fork-ts-checker-webpack-plugin/node_modules/schema-utils/src/validateOptions.js:32:11)
    at new ForkTsCheckerWebpackPlugin (/Users/bobgardner/Developer/dancingtogether/frontend/node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPlugin.js:28:31)
    at Object.<anonymous> (/Users/bobgardner/Developer/dancingtogether/frontend/config/webpack.config.dev.js:243:5)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/Users/bobgardner/Developer/dancingtogether/frontend/scripts/start.js:31:16)

Unable to listen to music

Django channels removed the websocketbridge in a minor release, which has to be replaced with another reconnecting web socket implementation.

This causes an internal server error on station pages because the static file can't be found.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

Audit server APIs to verify they properly enforce permission requirements

e.g. users can only refresh their own access tokens, only admins can remove a station, only admins can add new listeners to their station, only DJs can update the playback state

  • accounts
    • view profile
    • change password
    • delete an account
  • main - index, about, contact are public
  • radio
    • get stations
    • create a station
    • delete a station
  • radio api
    • refresh a Spotify access token
    • get a station
    • update a station
    • get station listeners
    • add a listener
    • remove a listener

Use etags and OCC to prevent the server reacting to stale client state

Scenario:

  • client1 is at s1 (state 1)
  • client2 is at s2 and sends message to server
  • server is now at s2
  • server broadcasts state update and updates track
  • client1 has not updated track yet and sends s1
  • server thinks client1 is stale and tries to update the track (again)

Plan

  • version the states with etag
  • client sends latest etag in player_state_change request
  • server rejects stale etags
  • when server broadcasts state update, it includes new etag
  • etag = LMDT of station's playback state
  • when client receives rejected state, it will wait X seconds to account for latency with Spotify, then try again. If it fails again, then do a resync (assume there was an error).

Persist audio settings between sessions

It was pretty loud when I first connected to a station. It would be nice to persist the setting so the sound isn't so jarring.

This is related to #9, as that allows changing the volume more than just mute/unmute.

Fix 'Invalid access token' error

I need to root cause this, it could be:

  1. maybe the html is being cached with an old access token
  2. the @spotify.fresh_access_token_required decorator isn't working as expected

Better client errors when Spotify returns error

e.g. ClientError('bad_spotify_response', 'Spotify servers are experiencing problems')

then surface this on the webpage. Maybe re-use the existing connection status message to say "Spotify is experiencing problems, the stream may not work as expected"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.