slowlydev / f1-dash

A real-time F1 dashboard
https://f1-dash.com
GNU General Public License v3.0
412 stars 39 forks source link

team radios some times won't play #38

Closed slowlydev closed 1 month ago

slowlydev commented 7 months ago

I have noticed the team radios sometimes fail to play, it can also be noticed when the timeline bar is bugged (already at the end, but hasn't even been played yet)

the problem is most likely in this file: https://github.com/Slowlydev/f1-dash/blob/main/dash/src/components/TeamRadioMessage.tsx

GARTOLO commented 4 months ago

Hi, I discovered this project recently, I've tried to replicate this bug but I can't. Can you give me more information? Old or slow PC (may affect the 10ms audio refresh rate). Thanks!

slowlydev commented 4 months ago

Hello there @GARTOLO, I noticed it usually happens towards the end of a race. So maybe too many "audio" html tags and it fails to load new ones, but I am not sure. I don't think old or slow PC is the issue.

Edit: Im not sure if this was Safari browser related, let me test it sometime.

Blize commented 3 months ago

Looked up some stuff, I havent found one that is quite like your problem, though I agree that it seems to be an safari issue. At least I only have that problem on mac. One issue though which I saw on mac with audio tags was this: html-audio

So maybe you could add this attribute preload="none" in this file TeamRadioMessages.tsx

Other than that there was one issue mentioned that said if you have diffrent type of audio files that this could lead to problems. Although I dont think f1 will send diffrent audio types. Haven´t had the time though to test this yet.

gabriele-v commented 2 months ago

Not sure if it can fits this issue or I should open a new one, but would be possible to autoplay audio messages immediately once are received?

slowlydev commented 2 months ago

Not sure if it can fits this issue or I should open a new one, but would be possible to autoplay audio messages immediately once are received?

Eh would be a new Issue, this one would be solved when v2 releases (checkout feature/v2 branch), and the autoplay feature I already have on my radar but maybe a new issue would be a good place to track this :)