Home Reference Source Test

References

summary
public

The Registry is a simple class that maintains a list of available controls and scenes, and can return them given control kinds or scene IDs.

public

MemorizingSubject acts like a BehaviorSubject, except that it is seeded with no value, calls to getValue() will fail before the first next call, and it does not push a value to subscribers if next has not been called.

public

C RPC

Primitive postMessage based RPC for the controls to interact with the parent frame.

public

An RPCError can be thrown in socket.call() if bad input is passed to the service.

public

F asset(path: ...string): string

Returns the fully qualified URL to a static project asset.

public

Since your interactive controls can be run by any client, it's sometimes useful (particularly if you do fancier service integration) to be able to verify that the player is who they say they are. This method provides a means for you to do that. This is what happens:

  1. You create a cryptographically secure challenge for the user. This MUST be done on your service; the challenge is used so that adversaries cannot impersonate users (for instance, by gathering challenge responses for their own integrations then injecting those into your controls).

  2. Mixer servers will create a token based on the challenge and a secret, and return that in the response to this method.

  3. You may transmit the token and challenge to your services and call /api/v1/interactive/identity/verify to get the user ID that corresponds to the token. The API will return a 400 if the challenge is invalid.

Visualized, that's something like this:

public

F isLoaded()

This signals to Mixer that the controls have been bound and are ready to start taking Interactive calls.

public

F Control(options: IControlOptions): *

Scene is a decorator you can use to designate a class as a Scene.

public

F Input(_options: IInputOptions): *

public

F Scene(options: ISceneOptions): *

Scene is a decorator you can use to designate a class as a Scene.

public

Singleton Clock instance.

public

Singleton Display instance.

public

The list of available locales.

public

V log: {"debug": function, "info": function, "warn": function, "error": function}

log has methods to capture messages from your controls.

public

Singleton Navigation instance.

public

Your project's package configuration.

public

Singleton Socket instance.

public

IControlDescriptor is returned from the Registry's .getControl(). This contains the Control options along with its constructor.

public

IControlOptions are passed to the @Control decorator to describe how the control is rendered.

public

IInputDescriptors are returned from the Registry's .getInputs(). This contains the inputs options along with its constructor.

public

IInputOptions are passed into the @Input decorator.

public

Contains the configuration of your project, in addition to any decorated controls and scenes we detected.

public

ISceneDescriptor is returned from the Registry's .getScene(). This contains the scene options along with its constructor.

public

ISceneOptions can be passed into the @Scene decorator.

public

ISettings are settings specific to each run of the custom controls.

public

IStateDump is a dump of the raw object tree.

public

IVideoPosition contains data about the position of the video relative to the iframe, in addition to its channel ID.

public

IVideoPositionList is given in the positions() observable from the Display.

public

IVideoPositionOptions are passed into display.moveVideo() to change where the video is shown on the screen.

public

An RxJS observable.

bundle

summary
public

C Clock

Clock handles synchronizing the local time against the server, adjusting for any client-size clock skew.

public

Display modified the display of interactive controls.

public

The Navigation class provides utilities for dealing with user requests to nevigate around or away from the interactive controls.

public

C Socket

The socket wraps the RPC instance and provides an event emitter than fires when various Interactive events come in.

Directories