Component:Ruby bindings Broadcasts

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

Broadcasts

broadcast_coll_changed

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.

broadcast_config_value_changed

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}"
    end
end

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.

broadcast_mediainfo_reader_status

broadcast_medialib_entry_added

broadcast_medialib_entry_changed

broadcast_playback_current_id

XMMS2 began playing another song.

  • res - another song's id.

broadcast_playback_status

Playback status was changed.

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

broadcast_playback_volume_changed

Volume changed.

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

broadcast_playlist_changed

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 - ??

broadcast_playlist_current_pos

Current position in playlist changed.

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

broadcast_playlist_loaded

Some playlist was loaded.

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

broadcast_quit

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.