Conversation
I've added several event emitters throughout the class in hopes to eventually take all DOM manipulation out of the player class. It should all be within the app level instead and simply use events and variables from the class.
The bitrate should now automatically select the 64kbps if the connection speed is 3G or slower. Users can also choose the speed manually via a select box that will now be generated on desktop.
Unless the browser supports the navigator.connection and the connection speed is above 3G, the gif animation and the cover art is not shown.
Call to action added along with the hiding and showing of the meta data upon playing and pausing. Also corrected a bug where music was auto starting by default and causing dom exceptions. It now requires an action by the user to start. Changing the bitrate before a stream does NOT instigate an auto play however changing it after playback has happened results in it remaining its last state continuing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have updated the class to account for event listeners as well as updated the initial code for it to be driven with imports.
The visualizer has been completely removed from the original player class and is now a stand-alone element that can be replaced with others' ideas.
The ability to update the mount that the player is connecting to is also added however it should be noted that there is no check to confirm it is ONLY fcc URLs that are used. This can technically take any audio filepath and apply it to the audio element. Not much of a security issue but just something to note.