Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mhroth committed Mar 25, 2012
1 parent 3450201 commit cd79de2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@ function sendMessageWithTimestamp(receiverName, timestamp, messageString) {
}
```

## registerReceiver
In order to receive messages sent from ZenGarden to JavaScript, an external receiver must be registered. For instance, if a receiver named "toJs" is registered, then every message sent to that receiver in ZenGarden (perhaps via a `[s toJs]` object) will also be sent to JavaScript. External receivers may be registered and unregistered at any time.

```JavaScript
function registerReceiver(receiverName) {
ZgnaclModule.postMessage("registerReceiver:" + receiverName);
}

function unregisterReceiver(receiverName) {
ZgnaclModule.postMessage("unregisterReceiver:" + receiverName);
}
```

## play & pause
Audio can be easily started and stopped via the `play` and `pause` commands, their function being self-explanatory. Note that when Cynical is paused, neither audio nor messages are processed. Cynical will behave as if time were standing still. If some kind of mute functionality is desired, while messages continue to be processed, this must be build directly into the patch.

Expand Down

0 comments on commit cd79de2

Please sign in to comment.