-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds "Save Song" button to save music to localstorage.Still in need… #212
Conversation
… of "my music" section on homepage to display the users music
localStorage.setItem("mySongs", JSON.stringify(mySongs)); | ||
} | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Insert a comma here and see if it builds (Line 279)
<br> | ||
<br> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this added break?
@scoyne122 thanks for your efforts here. I think this raises an interesting idea, I've been thinking about doing something similar. The "right" way to implement this would be using the YouTube API (otherwise you'll lose your list when changing browsers or devices) to save videos to a playlist, and require oauth (see what I did for YouTube watch later). This also ties into #1 - adding support for YouTube playlists. However, it's not quite that simple. When #186 goes in, we'll have Soundcloud support, meaning we'd need to support and cache 2 auth tokens. That's not necessarily a bad thing, but something we should collectively think about. Then we should consider how we want to handle playlists: a) YouTube & Soundcloud playlists are separated, or b) we add our own playlists feature that can contain music from either source. I think option b is more use friendly, but will be trickier to implement. Let me know what you guys think! cc: @zen-audio-player/contributors |
@shakeelmohamed I agree with moving to a cloud based approach to ensure the user's music transfers over devices or browsers. However, assuming Sound Cloud is integrated, it may be easier to implement our own user login system rather than the youtube API with oauth. Perhaps we could create a PHP or node.js backend that connects to a mySQL? Let me know your thoughts. |
I've been against this so far in order to keep the project both free and totally open. What you see on the |
Fair enough. |
We could do something like having a reserved playlist name ("Zen Audio Player") on both YouTube and Soundcloud, then aggregate them on the website depending on which service(s) the user is authenticated. |
Hey guys! But, as @shakeelmohamed said: I also think that it would be better to create a playlist on YouTube (maybe something with the name like |
@scoyne122 shall we close this PR? |
Closing since we've decided this won't be merged. Let's continue this conversation in #229 |
Added a "save song" button that saves a song to local storage. Still needs a "my music" section that can display the users saved songs.