项目作者: alhimik45

项目描述 :
Mplayer wrapper
高级语言: HTML
项目地址: git://github.com/alhimik45/fifo-player.git
创建时间: 2015-08-28T21:18:34Z
项目社区:https://github.com/alhimik45/fifo-player

开源协议:MIT License

下载


Fifo-player

Mplayer wrapper.
Application is controlled by named pipe.
It uses config file for settings, config must place in folder with program with name player-config.json

Config example:

  1. {"music_directory": ".", // default directory with music
  2. "base_directory": ".", // in which directory start change-directory command
  3. "mplayer_options": [], // additional options for mplayer
  4. "output_file": "/tmp/.song",// file for output current song
  5. "seek_seconds": 10, // seconds of relative seek
  6. // file that stores current working directory of player
  7. "current_directory_storage": "/tmp/.fifo-player-dir",
  8. // fifo used by program to control mplayer
  9. "mplayer_fifo": "/tmp/.mplayer-input",
  10. // fifo used to control program
  11. "input_fifo": "/tmp/.fifo-player-input"
  12. }

Available commands:

  • next - start next random song
  • pause - pause player
  • loop - infinitely play current song / disable infinite loop
  • play-file - shows window to select what file to play
  • change-folder - shows window to select music folder
  • change-random - switch beetween random and successive selecting of next song
  • seek-forward - seek forward to seek_seconds seconds
  • seek-forward - seek backward to seek_seconds seconds
  • increase-volume
  • decrease-volume

Usage example:

  1. ... # your wmiirc
  2. # fifo-player fifo
  3. PLAYER_FIFO_IN=/tmp/.fifo-player-input
  4. startup() {
  5. nw fifo-player.nw &>> player.log &
  6. }
  7. ...
  8. # somewhere at shortcut definitions
  9. KeyGroup Player
  10. Key Mod3-q
  11. echo pause > $PLAYER_FIFO_IN &
  12. Key Mod3-x
  13. echo next > $PLAYER_FIFO_IN &
  14. Key Mod3-z
  15. echo play-file > $PLAYER_FIFO_IN &

License

This software is licensed under the MIT license.