deep5050 / radio-active

Play any radios around the globe right from the terminal :zap:
https://www.radio-browser.info/#/
MIT License
469 stars 24 forks source link

Allow for external players command line parameters. #113

Open ZaxonXP opened 6 months ago

ZaxonXP commented 6 months ago

Is your feature request related to a problem? Please describe. Currently there is no way to do pause/play the stream from external command (see #82)

Describe the solution you'd like Allowing for external player command line configuration provide a way to control radioactive stream play/pause from external command (media buttons). In the configuration file there should be a section like player_cmd_parameters. For mpv I would use the following:

player_cmd_parameters=--input-ipc-server=/tmp/soc_mpv

Thís would allow controling mpv from external command like:

#!/bin/sh
# play
echo '{ "command": ["set", "pause", "no"] }' | socat - /tmp/soc_mpv
#!/bin/sh
# pause
echo '{ "command": ["set", "pause", "yes"] }' | socat - /tmp/soc_mpv
github-actions[bot] commented 6 months ago

Hi, @ZaxonXP, Thanks for your contribution :blue_heart: . Contributors :people_holding_hands: like you make the open source community :earth_africa: such an amazing place to learn :book: , inspire :angel:, and create :art: . We will investigate :eyes: and get back to you as soon as possible :+1: . Just make sure you have given us sufficient information :information_source:.

By that time enjoy this meme :point_down: , hope you like it :smile:

meme

Use this action on your projects. Use jokes on issues instead.