Fixing errors and adding bug checks
Hi everyone, so i were fixing some bugs that i saw that may broke the app, i fixed all of them (for now), here they are:
- There was a logic bug that a class (the one that controls the youtube iframe) where doing stuff that it wasnt supposed to do (not an unexpected behavior, but a logic that should be outside of it), it was an easy fix.
- There was a bug at the player class that when the provided sourceId (for the youtube iframe) where wrong or unable to use it crash and stopped doing anything else (like playing another musics). I tryied solving it in various ways, one was beffore the changes that i did in my last devlog, but i failed because the class that holds the player where hard to fix, this devlog fix it. I fixed it by adding some bug checks and, when some error ocurred, it play the next music.
- There was also a bug at the player class and youtube-iframe-controls class, that for a couple seconds in the start of the website it would broke if u tried to play a music. It was because in the start of the program the youtube API where unable to be used. To fix it i just made it wait until the API where ready using an ASYNC function.
- There was also a bug that, afther the past devlog, it was doing and request at the
/api/songswith params at the wrong format. Afther the past devlog the API started using the paramsgenre_idandemotion_id, but the frontend where passing with the incorrect name (genre, emotion).
Something that i implemented
- I upgraded the mysql query that where being used to get more infos about the music, before it where just returning infos like name, author, sourceId, etc, but now it also returns the genre and emotion from that given music.
- I added a bug check at the
playerclass, now if it fails it pass to the next music.
Something that i want implement
I want to implement a simple toast notification system that will apear when something fails, like the playing of some music.
Others
The youtube docs for the iframe where very helpful for this changes, check it out: https://developers.google.com/youtube/iframe_api_reference?hl=pt-br
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.