lavalink-devs / Lavalink

Standalone audio sending node based on Lavaplayer.
https://lavalink.dev/
MIT License
1.58k stars 668 forks source link

Direct MP3 Files 127 Bytes or More Do Not Fire TrackStartedEvent #476

Closed FireController1847 closed 3 years ago

FireController1847 commented 3 years ago

Description

We boiled it down to this: Playing an MP3 file directly from the URL will not fire the TrackStartedEvent if it is 127 characters or more longer. This can be a problem for services where they require a token to unlock the MP3 file.

Example: The following URL fires the TrackStartedEvent (126 characters):

https://filesamples.com/samples/audio/mp3/sample3.mp3?abcdefg=5&AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

The following does not (127 characters):

https://filesamples.com/samples/audio/mp3/sample3.mp3?abcdefg=5&AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

I wonder if this may tie into a possible deeper issue or if it is just affecting the TrackStartedEvent. Does Lavalink use a byte for storage anywhere? Any byte limitations? I'd be willing to take a shot at fixing this in the source, but I've never worked here so I may need some pointers as to what to pay attention to.

Version info

Client used: Victoria 5.1.11, Lavalink 3.3.2.5

Output of java -version:

openjdk 11.0.10 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)

spring.log

freyacodes commented 3 years ago

This sounds very unusual.

Does it just not fire the event or does it not play?

Are you receiving no events at all?

FireController1847 commented 3 years ago

I have been receiving all of the events except for the track started event. It appears to straight up simply not fire the event, though I can't see much using the log file since it doesn't output when the event is fired in the first place. This confused me too haha! I wonder if this may even be an issue with LavaPlayer 🤔

freyacodes commented 3 years ago

That's ... interesting

Most likely a bug in Lavaplayer yeah

FireController1847 commented 3 years ago

Alright, I will report this issue there