APIv2 - Rantanen/node-mumble GitHub Wiki

MumbleWrapper()

Mumble client API

Instances should be created with Mumble.connect().

Kind: global function

mumbleWrapper.users() ⇒ Array.<User>

Returns all users currently connected to the server.

Kind: instance method of MumbleWrapper
Returns: Array.<User> - - Users connected to the server

mumbleWrapper.channelById(id) ⇒ Channel

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.

mumbleWrapper.userById(id) ⇒ User

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.

mumbleWrapper.channelByName(name) ⇒ Channel

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.

mumbleWrapper.userByName(name) ⇒ User

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.

mumbleWrapper.inputStreamForUser(sessionId)

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.

mumbleWrapper.authenticate(name, password)

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.

mumbleWrapper.sendMessage(name, data)

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.

mumbleWrapper.outputStream(userid) ⇒ MumbleOutputStream

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.

mumbleWrapper.inputStream() ⇒ MumbleInputSTream

Retrieves an audio input stream.

Kind: instance method of MumbleWrapper
Returns: MumbleInputSTream - - Input stream for streaming audio to the server.

mumbleWrapper.joinPath()

Deprecated

Join a channel specified by a Mumble URL

Kind: instance method of MumbleWrapper

mumbleWrapper.sendVoice(chunk)

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.

mumbleWrapper.disconnect()

Disconnects the client.

Kind: instance method of MumbleWrapper

mumbleWrapper._userRemove()

Remove the user from the internal collection.

Invoked when the server notifies us of user leaving.

Kind: instance method of MumbleWrapper

mumbleWrapper._wrapEvents(source, prefix, events)

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.
⚠️ **GitHub.com Fallback** ⚠️