PlanarAlly icon indicating copy to clipboard operation
PlanarAlly copied to clipboard

[FEAT] Audio Playback Feature

Open kyoaku opened this issue 1 year ago • 4 comments

Hello PlanarAlly Team,

I’ve developed an audio management feature that allows Dungeon Masters to upload, select, and control audio playback for players during sessions. I currently use this feature in my own games (outside of PlanarAlly), and I believe it could be a useful addition to PlanarAlly.

You can find the project and details on my gitlab repo : vttaudiostream

Thanks for considering!

Kyoaku

kyoaku avatar Oct 01 '24 18:10 kyoaku

Hey, thanks for reaching out. The topic of audio playback has come up before so I definitely wouldn't mind integrating with something.

I'm not yet sure how the actual integration would work from a UI point of view. So if you have some suggestions there, let me know.

Kruptein avatar Oct 02 '24 06:10 Kruptein

Okay, I will try to integrate my code into your project and then submit a pull request to have a starting point and possibly think about how to integrate it into the UI.

kyoaku avatar Oct 02 '24 17:10 kyoaku

Hi, I just created a fork with the audio streaming feature.

https://github.com/kyoaku/PlanarAlly/tree/feature/audio-stream

There will probably be some adjustments to make (I'm neither a Python nor Vue developer, and I'm not a regular contributor on GitHub either). This could be considered as a starting point for integrating sound into the project.

At the moment, it only searches for MP3 files in the root of the assets directory.

The DM will be able to preview an MP3 and start playing it (or another) for the players. They will also have the option to play the audio in a loop for the players.

image

On the players' side, they will be able to pause, resume playback, and adjust the volume.

image

Note: I’m already using the same mechanism in a separate Docker container (I currently have two open pages, PlanarAlly and the system I’m proposing, and it works quite well). But as mentioned above, this can be seen as a starting point for a more complete feature.

kyoaku avatar Oct 20 '24 15:10 kyoaku

So doing some surface level thinking on how this could be implemented.

If this feature is added I'd like to see a few triggers for audio playback:

  • Assets entering a visible layer
  • Location is opened in a client
  • basic keybinding support for play/pause/skip

Then maybe playlist support with an order/shuffle? have it play on loop by default, but have an option to disable loop. Also when non of the above mentioned triggers are true obviously pause or stop playback entirely.

10leej avatar Feb 16 '25 13:02 10leej