Created
May 30, 2018 19:47
-
-
Save phm200/5757ac4e1adfd7bb2a5301c4138667aa to your computer and use it in GitHub Desktop.
Streams PR #61 - Mute Control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Agent.prototype.onMuteToggle = function(f) { | |
var bus = connect.core.getEventBus(); | |
bus.subscribe(connect.AgentEvents.MUTE_TOGGLE, f); | |
}; | |
Agent.prototype.mute = function() { | |
connect.core.getUpstream().sendUpstream(connect.EventType.BROADCAST, | |
{ | |
event: connect.EventType.MUTE, | |
data: {mute: true} | |
}); | |
}; | |
Agent.prototype.unmute = function() { | |
connect.core.getUpstream().sendUpstream(connect.EventType.BROADCAST, | |
{ | |
event: connect.EventType.MUTE, | |
data: {mute: false} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment