Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

220
Visualizações
Managing shuffled audio files across multiple simple players when files are not exclusive to one player (HTML/JS/CSS)

I have a website set up with 3 simple audio players (F, R, and C) such that clicking an image pauses all other players (if any are playing) and plays preloaded audio file until it is clicked again, another is clicked, or the track ends — no other controls.

Instead of preloaded audio, I want the players to shuffle and play a series of files from the audio folder. Each player should have its own unique 'playlist', but some tracks will belong to multiple players/playlists, e.g., track 1 is in the playlist of players F and C, but not player R.

My inclination was to use the track filenames to 'tag' them for certain players. For example, naming an audio file 'fr.mp3' would make the file 'available' to the playlists of players F and R, and not to player C. Presumably all filenames would be returned as strings and passed through an if statement that decides whether they are added to an index that is then shuffled and played.

If this approach is wise, how would I go about implementing it? If this approach is foolish, what should I do instead? I'd ideally like it to be easy to add more files in the future by simply dropping them into the audio folder with the appropriate naming convention.

If it's any help, the current code is in this github repo, https://github.com/chrisscottromano/musicradiosite but all it does currently is manage playing each players' preloaded audio and pause others when one is played. I'm a bit stumped on how to modify it to perform like described above.

The current code also has a page if seeing the site in action is useful https://chrisscottromano.github.io/musicradiosite/

Any bright ideas?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda