Component:Ruby bindings Broadcasts

Erik Massop edited this page Nov 4, 2017 · 1 revision



Collection changed.

  • res[:name] - name of a changed collection.
  • res[:namespace] - it's namespace.
  • res[:type] - type of change:
    • Xmms::Collection::ADD - new collection was added.
    • Xmms::Collection::UPDATE - collection was changed.
    • Xmms::Collection::RENAME - collection was renamed.
      • res[:newname] - new name of a collection.
    • Xmms::Collection::REMOVE - collection was removed.


Some configuration variable changed.

  • res is a hash of key-value pairs. Key is a configuration variable name, while value is... well, it's value. Sample code:
xmms.broadcast_config_value_changed.notifier do |res|
    res.each_pair do |key, value|
        puts "#{key} = #{value}"

Note: in v.0.6 and v.0.7 key is a symbol. It is a bug. Use key.to_s to get key's name.





XMMS2 began playing another song.

  • res - another song's id.


Playback status was changed.

  • res - new status:
    • Xmms::Client::PLAY - playing;
    • Xmms::Client::STOP - stopped;
    • Xmms::Client::PAUSE - paused.


Volume changed.

  • res[:left] - left channel's volume.
  • res[:right] - right channel's volume.


Playlist changed.

  • res[:name] - name of a changed playlist.
  • res[:type] - type of change:
    • Xmms::Playlist::ADD - song was added (?)to the end(?) of a playlist.
      • res[:id] - id of a new song;
      • res[:position] - new song's position.
    • Xmms::Playlist::INSERT - song was inserted to a playlist at some position.
      • res[:id] - id of a new song;
      • res[:position] - new song's position.
    • Xmms::Playlist::SHUFFLE - playlist was shuffled.
    • Xmms::Playlist::REMOVE - song was removed from a playlist.
      • res[:position] - position of a song.
    • Xmms::Playlist::CLEAR - playlist was cleared.
    • Xmms::Playlist::MOVE - song was moved from one position in a playlist to another.
      • res[:position] - old position of a song;
      • res[:newposition] - new position of a song.
    • Xmms::Playlist::SORT - playlist was sorted.
    • Xmms::Playlist::UPDATE - ??


Current position in playlist changed.

  • res[:name] - name of a playlist.
  • res[:position] - new active song's position.


Some playlist was loaded.

  • res - name of a loaded playlist (string).


Server was shutdown.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.