MumbleConnection - Rantanen/node-mumble GitHub Wiki
- MumbleConnection(socket, options)
-
Mumble connection
-
encodeVersion(major, minor, patch) ⇒
number -
Encodes the version to an uint8 that can be sent to the server for version-exchange
Params
- socket
Socket- SSL socket connected to the server. - options
Object- Connection options.
Mumble connection
-
MumbleConnection(socket, options)
-
Methods
- authenticate(name, password, tokens)
- disconnect()
- initialize()
- inputStream(options)
- joinPath(path)
- outputStream(userSession, noEmptyFrames)
- sendEncodedFrame(packets, codec, [whisperTarget], [voiceSequence])
- sendMessage(type, data)
- sendVoice(chunk, whisperTarget)
- sendVoiceFrame(frame, [whisperTarget], [voiceSequence])
-
Methods
Params
- name
string- Username - password
string- User password - tokens
Array.<string>- Access tokens
Authenticate the user
Disconnects the client from Mumble
Send the static init information
Params
- options
Object- Input stream options
Returns: MumbleInputStream - Input stream.
Returns a new input stream for audio.
Params
- path
string- Path to join.
Join a channel specified by a Mumble URL
Params
- userSession
number- Optional user session ID. If omitted the output stream will receive the mixed audio output for all users. - noEmptyFrames
bool- Enable or disable emitting empty frames for silence.
Returns: MumbleOutputStream - Output stream.
Returns a new output stream for audio.
Send encoded voice frames.
Params
- packets
Buffer- Encoded frames. - codec
number- Audio codec number for the packets. - [whisperTarget]
number- Optional whisper target ID. Defaults to null. - [voiceSequence]
number- Voice packet sequence number. Required when multiplexing several audio streams to different users.
Returns: number - Amount of frames sent.
Params
- type
string- Message type ID - data
Object- Message data
Send a protocol message
Params
- chunk
Buffer- PCM audio data in 16bit unsigned LE format. - whisperTarget
number- Optional whisper target ID.
Send voice data to the server.
TODO: Add a flush timeout to flush remaining audio data if the buffer contains remnant data.
Send a voice frame.
Params
- frame
Buffer- Voice frame. The buffer must be the size of a one frame. Use sendVoice to send arbitrary length buffers. - [whisperTarget]
number- Optional whisper target ID. Defaults to null. - [voiceSequence]
number- Voice packet sequence number. Required when multiplexing several audio streams to different users.
Returns: Buffer - Frames sent
Params
- major
number- Major version. - minor
number- Minor version. - patch
number- Patch number.
Returns: number - 32-bit encoded version number.
Encodes the version to an uint8 that can be sent to the server for version-exchange