GithubHelp home page GithubHelp logo

rwieruch / favesound-redux Goto Github PK

View Code? Open in Web Editor NEW
1.6K 42.0 247.0 508 KB

🎢 A SoundCloud Client in React + Redux running in production. Live Demo and Source Code to explore React + Redux as a beginner.

Home Page: http://www.robinwieruch.de/the-soundcloud-client-in-react-redux/

JavaScript 92.07% CSS 7.93%
soundcloud soundcloud-api soundcloud-client player playlist redux react demo duration normalizr react-router redux-thunk react-router-v4

favesound-redux's Introduction

favesound-redux

Build Status Slack

The SoundCloud Client in React + Redux made with passion. Demo, Sibling Project: favesound-mobx

Get started on your own!

Includes

  • react v. 16
  • react-router v. 4
  • redux
  • react-redux
  • redux-thunk
  • normalizr
  • lodash-fp
  • airbnb-extended eslint
  • enzyme v. 3
  • Soundcloud API.

Features

  • login to SoundCloud
  • show your personal stream
  • show favorite tracks, followers and followings
  • infinite scroll + paginated fetching
  • follow people
  • like tracks
  • player play/stop/forward/backward track
  • player with shuffle tracks, share link and volume
  • player with duration bar for tracks and navigation
  • playlist
  • sort tracks by plays, likes, comments, reposts, downloads
  • filter tracks by duration
  • search tracks by name and artist

Run on your Machine

  1. Clone Repository: git clone [email protected]:rwieruch/favesound-redux.git
  2. npm install
  3. npm start
  4. visit http://localhost:8080/
  5. npm test

Contribute

I am looking actively for contributors to make this project awesome!

I wouldn't want to extend the project with new routes like: that's my profile page and that's my favorite track page. Rather I see more value in improving the status quo of the app: Improving the player, the playlist or the interaction overall. I would love to see a GitHub issue to see where you want to work on. Moreover I will try to find the time to raise some more issues where people can contribute. At the end it is a perfect project to get started in open source!

Improve

Feedback is more than appreciated via GitHub or Twitter

favesound-redux's People

Contributors

alameen007 avatar c-rodg avatar dawnywu avatar egor3333 avatar erikmartinessanches avatar gspanue avatar jasonkwong11 avatar kafisher avatar rwieruch avatar siyounguk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

favesound-redux's Issues

Add favicon

For a site named favesound I think a nice prominent favicon would be fitting :)

image

Add Refresh button

A refresh button that gets the newest tracks would be great, especially considering browser refresh results in sign-out (#82).

Failed to play song

screen shot 2017-06-06 at 5 39 01 am

This happens when I try to play a song. I think this may be related to too many requests have been made under one client_id, should we use an alternative client_id?

Errors: npm run test

This will happen when I tried to run npm test, probably related to React versions.
screen shot 2017-06-18 at 2 04 28 pm

Upgrade to React 16

React 16 got released and there are practically no changes to the external API of React. Perhaps it would be an easy win to upgrade the project to React 16. Someone keen to do it?

Refresh signs me out

If I hit the refresh button, or close and re-open the page, I get signed out.

I saw issue #44 which might be related, but if this was intentional I would humbly suggest you reconsider - practically all sites I can think of retain the OAuth cookie and keep you signed in as long as the token is valid...

Serve site in HTTPS

In the age of "HTTPS everywhere" it is highly recommended, especially considering OAuth tokens are involved.

There are two free options to achieve this:

  1. Serve off CloudFlare and enable SSL (the "Flexible" options is zero-setup)
  2. Let's Encrypt. I wrote a WebJob that does this automatically for Azure Web Apps: https://github.com/ohadschn/letsencrypt-webapp-renewer.

Feature Proposal: Automatically play next song in stream

Right now only the next song in a playlist will be played automatically, but stops after the playlist finishes. I propose the player should keep always play a continuous stream of music and automatically play the next song in the stream if the playlist finishes or if you didn't create a playlist.

Need help: Error occurs when trying to run command npm start

Hi guys, I tried to run the app locally, after I clone the git repo, the 'npm install' worked just fine but when I ran 'npm start' I got the following output, I am using a Mac OS X with node version: 7.5.0 and npm 4.2.0. Not sure what is going on here.

webpack-dev-server --progress --colors --hot --config ./webpack.config.js
70% 1/1 build moduleshttp://localhost:8080/webpack-dev-server/
webpack result is served from /


content is served from ./dist
404s will fallback to /index.html
45% 13/22 build modules

> #
> # Fatal error in ../deps/v8/src/api.cc, line 1051
> # Check failed: !value_obj->IsJSReceiver() || value_obj->IsTemplateInfo().
> #

==== C stack trace ===============================

   0   node                                0x0000000100bce203 v8::base::debug::StackTrace::StackTrace() + 19
   1   node                                0x0000000100bcb389 V8_Fatal + 233
   2   node                                0x0000000100147afa v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute) + 330
   3   binding.node                        0x0000000104f363f2 SassTypes::Boolean::get_constructor() + 352
   4   binding.node                        0x0000000104f3830b SassTypes::Factory::initExports(v8::Local<v8::Object>) + 407
   5   node                                0x00000001009cf21f node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&) + 854
   6   node                                0x000000010017c39a v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) + 378
   7   node                                0x00000001001e023c v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 924
   8   node                                0x00000001001df679 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 281
   9   ???                                 0x000008f8dcc063a7 0x0 + 9864948507559
Illegal instruction: 4

Search artist name too

Currently the search box only searches the mix's title, it would be nice if it searched the artist's name too.

Display and filter by tags

  • Tags are useful when you have several genres in your feed and you want to know which track is which.
  • Being able to filter by tags (preferably using a multi-select dropdown) would be even better!

Filter by downloadability

It would be very useful to be able to filter by tracks that can be downloaded. Personally I'm downloading mixes to listen in my car, so that's key information to have.

This site has this feature, so it should be possible: http://mixyard.com/

Expose the generic browse/KEYWORD functionality

I noticed that navigating to http://www.favesound.de/browse/FOO gives me tracks related to FOO (I'm guessing using FOO as a keyword with the SoundCloud search API).

This is super useful, so it's a shame to limit it to just the links at the top (Tech House, Minimal, Deep House... we aren't all German πŸ˜‰).

It could be as simple as a button that pops up a search dialog and then navigates to browse/foo. Or even better, add a text box to the same row of current genre links where one could enter his own genre (ideally this would be responsive but seeing as the current design relies on a redirect, some OK button would be great too).

Open links in a new tab/window

It is a good practice for media sites to open links in a new tab/windows (using target=β€œ_blank”, preferably with rel="noopener" for better security and performance) as to not interrupt currently playing audio/video.

This is especially important as long as navigating out of the page incurs sign-out (#82).

[Minor] Nesting anchor tag warning

  1. When clicking play button, this warning pops up.

screen shot 2017-06-19 at 5 21 20 pm

  1. It sometimes appears in a weird position like the following:

screen shot 2017-06-19 at 10 00 25 pm

screen shot 2017-06-19 at 10 00 41 pm

  1. As for now, we have to click the button again to make the tooltip to disappear, IMO, I think it should be automatically hidden after a certain amount of time.

I'll create a PR tonight to fix these.

Feature Proposal: Player with Duration Bar

At this time, once you want to listen to a track, you only get to see a backward, a play/pause and a forward button in the player.

screen shot 2016-07-08 at 17 39 43

But most of the audio player come with a progress bar and a current time to indicate the playback time duration.

screen shot 2016-07-09 at 12 45 29

It would be cool to have something like this for FaveSound as well! One could implement it in different ways. Either you use a stateful component within the player which keeps track of the duration time of the track or you save that state to the global redux state. I would recommend to do the former, otherwise you will end up with a lot recurring actions (like every 5 seconds?).

Feature Proposal: Mini Profile Popover

There is no extra page to see the whole profile of an user. In my opinion there shouldn't be one, because it would clutter more and more the app without having a real use case for it. I think FaveSound does quite well only with one visually minimal page where one can look up easily new tracks and play them.

But at the end it would be cool to have some mini profile popover with a bigger picture and some actions like "Follow" on it.

screen shot 2016-07-08 at 17 56 38

One could place it everywhere where user pictures are already used.

screen shot 2016-07-08 at 17 53 13

I guess the difficulty is to make a very good positioning in CSS which is doing well in all kinds of browsers.

Feature Proposal: Shuffle Playlist

There could be a button in the player which allows you to toggle the shuffle mode. You could easily save this in the global redux state. Once it is set to shuffled, you only need to make sure that the next played track is a random track from the playlist.

Player component src/components/Player where you would have to place the Shuffle Button. It has to fire a new action via src/actions/player to set the shuffleMode in the src/reducers/player

const initialState = {
  shuffleMode: false,
  activeTrackId: null,
  isPlaying: false,
  playlist: []
};

Once the mode is implemented, the second step would be to adapt the action which gets fired in

<ButtonInline onClick={() => onActivateIteratedTrack(activeTrackId, 1)}>
  <i className="fa fa-step-forward" />
</ButtonInline>

in src/components/player to respect the shuffleMode. Rather than playing the next track, it should play some random track from the playlist. The logic would get implemented in src/actions/player.

[UI] Tooltips not having enough space to display on top

When the screen size is small, tooltips will not have enough space to be displayed on top of the button.
screen shot 2017-06-28 at 1 12 45 am

I tried to adjust the player left and right margin to 10%, it will have enough space to display. However, this will change how the player looks. Any suggestions on this?
screen shot 2017-06-28 at 1 18 24 am

Bug: Volume Slider doesn't close

The Volume Slider that is attached to the Player in the bottom doesn't close when the Player closes. However, that should be the case. It should be the same as the Playlist that is attached to the Player which disappears when the Player disappears.

screen shot 2017-05-26 at 10 29 22

Improve authentication redirect logic

First off, the current logic is that if user access dashboard without authentication, it gives back a blank dashboard page, however, the dashboard should be a protected route that should only be shown when authenticated.

Second, when the authentication process failed for whatever reason or canceled by the user, it might be better to redirect to the home page instead of returning a blank dashboard page.

I have created a pull request for this #76.

Feature Proposal: Volume

It would be cool to adjust the volume from within the player! The volume from 0 to 100 could be saved in the global state. Moreover it could have a mute state when you click the button.

screen shot 2016-07-08 at 18 02 58

Player component src/components/Player where you would have to place the Volume interaction. It has to fire a new action via src/actions/player to set the volume from 0 to 100 in the src/reducers/player

const initialState = {
  volume: 70,
  activeTrackId: null,
  isPlaying: false,
  playlist: []
};

When you click the mute button, it should set the volume to 0. Once this is implemented, one would take the new volume property in the player component for the <audio ... /> element to adjust the volume.

Improvements: Automatically login if we have a valid oauth_token in cookie.

After we successfully login and then close the app without logging out, the oauth_token would still be in the cookie, next time when we visit out app all requests will be made with oauth_token but our app would be in logged out state.
So should we check if oauth_token is there, if it is, we perform a login and fetch everything related to this user?
Or should we log the user out when we close the app to keep the oauth_token in cookie and our auth state in sync?

Feature Proposal: Play next Track once the current Track finished

Although FaveSound comes with a Playlist, it doesn't automatically play the track in queue after the previous track finished. That's because nobody keeps track of the duration of a playing track. It would be cool to have the next track automatically playing after the current track ends. Before it would be helpful to implement #3.

Add date filtering to browse/KEYWORD view

SoundCloud's default sorting algorithm, as well as sorting by plays/likes/reposts heavily favor old tracks (since they had a lot of time to gain popularity). For example, the first track on the main favesound page is four years old!

It would be great to have the option to filter by date, like SoundCloud allows ("past year", "past month" and so forth).

This isn't an issue when logging in, because the home feed is sorted by date by default.

Implement a 'share' song feature

At the bottom left of the playing track there should be a button or link that when clicked, copies the link of the soundcloud track currently being played. This allows users to easily paste and share the link with friends.

Minor: Playlist UI issue

When the user add more music into the playlist, the last one would not be fully displayed like this:
screen shot 2017-02-17 at 12 09 33 am

After:
screen shot 2017-02-17 at 12 10 02 am

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.