This NPAPI plugin allows access to the Mumble Link data.
The main entry point to the Mumle Link API, every time you access a property or sub-object properties the value will be up to date.
The Mumble Link version.
The unique ID for the current Mumble Link data, it's updated by the game after every frame.
The name of the Mumble Link provider, usually the name of the game.
Additional information about the Mumble Link provider.
A Context
object uniquely representing the context the player is in, for
example world, map, team and whatnot.
An uniquely identifying string for the character, usually a JSON string with more information about the character.
A Space
object describing where the player is.
A Space
object describing where the camera is.
This method will return a Snapshot
object.
The Snapshot
object has all attributes of the Live
object, but the values
are frozen to the moment the call was made.
The Context
object is an array-like object containing the bytes composing the
context identifier.
The Space
object describes the position of an element in 3D space.
A Vector
describing the position of the element in 3D space.
A Vector
describing the orientation of the element in 3D space.
A Vector
describing where the character is looking at in 3D space.
Represent a point in 3D space.
A double going towards right.
A double going towards up.
A double going towards the front.
To get access to the API you have to add an <embed>
tag for the plugin to
work.
<embed id="mumble" width="0" height="0" type="application/x-mumble-link">
In case it's not working, try adding the following code as early as possible.
navigator.plugins.refresh(true);
Then you can access the Live
properties and methods on the <embed>
tag itself.
function mumble() {
return document.getElementById("mumble");
}
console.log(mumble().identity);
I advice to take snapshots instead of accessing the Live
itself so as to keep
consistency between accesses in the same context.
For example if you're running some kind of DOM update in a setInterval:
setInterval(function() {
var m = mumble().snapshot();
console.log(m.identity);
console.log([m.avatar.position.x, m.avatar.position.y, m.avatar.position.z]);
}, 1000);
Also make sure the <embed>
tag is not hidden, styling it to be visibility: hidden
or display: none
will cause the browser to unload the plugin.
As an alternative you can use position: absolute; top: -5px; left: -5px
.