Skip to content

Track / expose mixer status#196

Open
benlangfeld wants to merge 1 commit into
developfrom
feature/mixer_status
Open

Track / expose mixer status#196
benlangfeld wants to merge 1 commit into
developfrom
feature/mixer_status

Conversation

@benlangfeld

Copy link
Copy Markdown
Member

WIP. See adhearsion/adhearsion#411

Todo:

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-11.49%) to 87.58% when pulling 195518e on feature/mixer_status into 85f7b2c on develop.

@benlangfeld

Copy link
Copy Markdown
Member Author

Support for this was recently added to mod_rayo.

@pungoyal

Copy link
Copy Markdown

The rayo spec Section 6.4 Mixers Example 41 suggests that the mixer presence is notified as:

<presence from='myMixer@mixer.shakespeare.lit'
          to='juliet@capulet.lit/balcony'>
  <c xmlns='http://jabber.org/protocol/caps'
     hash='sha-1'
     node='urn:xmpp:rayo:mixer:1'
     ver='QgayPKawpkPSDYmwT/WM94uAlu0='/>
</presence>

This has a xmlns of http://jabber.org/protocol/caps. How will Punchblock::Event::MixerCreated register itself to be triggered for this presence notification (from: https://github.com/adhearsion/punchblock/blob/develop/lib/punchblock/core_ext/blather/stanza.rb#L10)?

One way out is to put if-else blocks in https://github.com/adhearsion/punchblock/blob/develop/lib/punchblock/connection/xmpp.rb#L132 and manually trigger Punchblock::Event::MixerCreated and Punchblock::Event::MixerDestroyed. That will be ugly.

Is there another way of achieving the same?

@benlangfeld

Copy link
Copy Markdown
Member Author

So instead of if-else blocks, we'll could use guards with a further set of handlers defined here: https://github.com/adhearsion/punchblock/blob/develop/lib/punchblock/connection/xmpp.rb#L171. If you'd like to make a pass at this, that'd be lovely. I'll happily review any incoming PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants