APIv2 - Rantanen/node-mumble GitHub Wiki
Mumble client API
Instances should be created with Mumble.connect().
Kind: global function
-
MumbleWrapper()
-
.users() ⇒
Array.<User>
-
.channelById(id) ⇒
Channel
-
.userById(id) ⇒
User
-
.channelByName(name) ⇒
Channel
-
.userByName(name) ⇒
User
- .inputStreamForUser(sessionId)
- .authenticate(name, password)
- .sendMessage(name, data)
-
.outputStream(userid) ⇒
MumbleOutputStream
-
.inputStream() ⇒
MumbleInputSTream
.joinPath()- .sendVoice(chunk)
- .disconnect()
- ._userRemove()
- ._wrapEvents(source, prefix, events)
-
.users() ⇒
Returns all users currently connected to the server.
Kind: instance method of MumbleWrapper
Returns: Array.<User>
- - Users connected to the server
Find a specific channel by its channelId.
Kind: instance method of MumbleWrapper
Returns: Channel
- - The channel found or undefined.
Param | Type | Description |
---|---|---|
id | Number |
Channel ID to search for. |
Find a specific user by their user ID.
User ID exists only on registered users. The ID will remain the same between different sessions.
Kind: instance method of MumbleWrapper
Returns: User
- - The user found or undefined.
Param | Type | Description |
---|---|---|
id | Number |
The user ID to search for. |
Find a specific channel by its name.
Kind: instance method of MumbleWrapper
Returns: Channel
- - The channel found or undefined.
Param | Type | Description |
---|---|---|
name | String |
Channel name to search for. |
Find a specific user by its name.
Kind: instance method of MumbleWrapper
Returns: User
- - The user found or undefined.
Param | Type | Description |
---|---|---|
name | String |
User name to search for. |
Allocates an input stream for a specific user session
Kind: instance method of MumbleWrapper
Param | Type | Description |
---|---|---|
sessionId |
Number | Array
|
Single user session ID or an array of those. |
Authenticate on the server.
This method must be invoked to start the authentication handshake. Once the
handshake is done the client emits initialized
event and the rest of the
functionality will be available.
Kind: instance method of MumbleWrapper
Param | Type | Description |
---|---|---|
name | String |
Username. Ignored for registered users who will use the username registered with the certificate. |
password | String |
Optional password. Required if the username is in use and certificate isn't supplied. |
Sends a raw Mumble protocol message to the server.
Serializes and sends a protocol buffer message to the Mumble server. This method can be used to invoke functionality not otherwise exposed by the API. Shouldn't be needed for most operations.
Kind: instance method of MumbleWrapper
Param | Type | Description |
---|---|---|
name | String |
Protocol buffer message name. Reference mumble protocol buffer documentation: https://github.com/mumble-voip/mumble/blob/master/src/Mumble.proto |
data | Object |
JavaScript object representation of the protocol buffer message to serialize. |
Retrieves an audio output stream.
Kind: instance method of MumbleWrapper
Returns: MumbleOutputStream
- -
Output stream that can be used to stream the audio out.
Param | Type | Description |
---|---|---|
userid | Number |
Optional user session ID. Defines the user whose audio the stream will handle. If omitted the stream will output mixed audio. |
Retrieves an audio input stream.
Kind: instance method of MumbleWrapper
Returns: MumbleInputSTream
- -
Input stream for streaming audio to the server.
Deprecated
Join a channel specified by a Mumble URL
Kind: instance method of MumbleWrapper
Sends a raw voice frame to the server.
Consider using the streams.
Kind: instance method of MumbleWrapper
Param | Type | Description |
---|---|---|
chunk | Buffer |
16bitLE PCM buffer of voice audio. |
Disconnects the client.
Kind: instance method of MumbleWrapper
Remove the user from the internal collection.
Invoked when the server notifies us of user leaving.
Kind: instance method of MumbleWrapper
Wraps source events to be emitted from the Wrapper as well.
Kind: instance method of MumbleWrapper
Param | Type | Description |
---|---|---|
source | Object |
Original event source |
prefix | String |
Event prefix for the events the source emits. |
events | Array.<String> |
Events to delegate. |