Page 1 of 1

Control Spotify from factorio

Posted: Sun Jul 25, 2021 10:16 am
by wlkrd1
I have a conundrum, I use Spotify a lot while gaming, especially while playing Factorio, and occasionally I come across a song that I'm either not in the mood to listen to or just want to skip which means I have to minimize Factorio, go to the Spotify window and skip the song. So my ultimate question is, is it at all possible to create a mod with a simple UI that has maybe Play/Stop/Next/Previous buttons and a now playing?
Just a shot in the dark. I am somewhat fluent in lua, but I don't know how I would connect with Spotify.
Tia!

Re: Control Spotify from factorio

Posted: Sun Jul 25, 2021 9:46 pm
by PFQNiet
Does your keyboard not have media keys? Even if there aren't dedicated keys, there's usually a key combo to quickly skip to the next track. And if there isn't, any decent music player should provide hotkey functionality.

Re: Control Spotify from factorio

Posted: Sat Jul 31, 2021 9:06 am
by Qon
It is possible, but you would need a "translating" program that reads files written by the mod and that can actually control spotify directly. A mod can't directly control spotify though. But why should it be a mod? Autohotkey can let you hit media keys from another hotkey and it would work the same except it keep working when Factorio is off.

Neither would give a "now playing" text. Should be possible to get it from spotify title text, easy if spotify provides now playing there. Could be inserted into factorio with a rcon mod...

A lot of effort, don't do it.

Re: Control Spotify from factorio

Posted: Sat Jul 31, 2021 3:22 pm
by MEOWMI
As said, usually music players will let you configure global shortcut keys that you can use at any time, in addition to the default media keys which should also work if your keyboard has them.