Options
All
  • Public
  • Public/Protected
  • All
Menu

The Remixer class is a singleton class that keeps track of all the Variables and deals with saving/syncing its values.

class

Hierarchy

  • Remixer

Index

Properties

Private _frameElement

_frameElement: HTMLFrameElement

Private _variables

_variables: IVariableKeyMap

Static Private _sharedInstance

_sharedInstance: Remixer = new Remixer()

Initializes a new instance of Remixer.

static
returns

A new instance of Remixer.

Accessors

remote

variables

variablesArray

  • Returns an array of Variables from the Remixer shared instance.

    Returns Variable[]

    Array of Variables.

Static attachedInstance

  • Provides ability for Remixer HTML iFrame to access this instance of Remixer.

    Returns Remixer

    The attached instance of Remixer.

Static frameElement

  • get frameElement(): HTMLFrameElement
  • Returns the HTML iFrame added for this instance of Remixer.

    static

    Returns HTMLFrameElement

    The Remixer HTML iFrame.

Methods

Private addKeyListener

  • addKeyListener(): void
  • Adds a key listener used to trigger the Remixer overlay.

    Returns void

Private appendFrameToBody

  • appendFrameToBody(): void
  • Appends an HTML iFrame to the body of client page.

    Returns void

Static addBooleanVariable

  • Adds a boolean Variable to array of Variables with optional callback.

    Parameters

    • key: string

      The key of the Variable.

    • defaultValue: boolean

      The initial default value of the variable.

    • Optional callback: IVariableCallback

      The callback method to be invoked when the Variable is updated.

    Returns BooleanVariable

Static addColorVariable

  • Adds a color variable to array of variables with optional callback.

    Parameters

    • key: string

      The key of the Variable.

    • defaultValue: string

      The initial default value of the variable.

    • Optional limitedToValues: string[]

      The optional array of allowed values.

    • Optional callback: IVariableCallback

      The callback method to be invoked when the Variable is updated.

    Returns ColorVariable

Static addNumberVariable

  • Adds a number variable to array of variables with optional callback.

    Parameters

    • key: string

      The key of the Variable.

    • defaultValue: number

      The initial default value of the variable.

    • Optional limitedToValues: number[]

      The optional array of allowed values.

    • Optional callback: IVariableCallback

      The callback method to be invoked when the Variable is updated.

    Returns NumberVariable

Static addRangeVariable

  • addRangeVariable(key: string, defaultValue: number, minValue: number, maxValue: number, increment: number, callback?: IVariableCallback): RangeVariable
  • Adds a range Variable to array of Variables with optional callback.

    Parameters

    • key: string

      The key of the Variable.

    • defaultValue: number

      The initial default value of the variable.

    • minValue: number

      The allowed minimum value of the variable.

    • maxValue: number

      The allowed maximum value of the variable.

    • increment: number

      The amount to increment the value.

    • Optional callback: IVariableCallback

      The callback method to be invoked when the Variable is updated.

    Returns RangeVariable

Static addStringVariable

  • Adds a string Variable to array of variables with optional callback

    Parameters

    • key: string

      The key of the Variable.

    • defaultValue: string

      The initial default value of the variable.

    • Optional limitedToValues: string[]

      The optional array of allowed values.

    • Optional callback: IVariableCallback

      The callback method to be invoked when the Variable is updated.

    Returns StringVariable

Static Private addVariable

  • Adds a variable to the array of variables. Once added, will save and execute the callback.

    static

    Parameters

    • variable: Variable

      The variable to add.

    Returns void

Static cloneAndUpdateVariable

  • Clones and updates the selected value of a given Variable from the Remixer shared instance. Allows immutability update required for React rendering.

    static

    Parameters

    • variable: Variable

      The variable to clone and update.

    • selectedValue: any

      The new selected value.

    Returns Variable

    The cloned variable with updated selected value.

Static getVariable

  • Returns an Variable for a given key from the Remixer shared instance.

    static

    Parameters

    • key: string

    Returns Variable

    Array of Variables.

Static saveVariable

  • saveVariable(variable: Variable): void
  • Saves the Variable to both local storage and remote.

    static

    Parameters

    • variable: Variable

      The Variable to save.

    Returns void

Static start

  • start(remoteConfig?: __type): void
  • Appends the HTML iFrame to body of client app. Attaches key listener to toggle Overlay visibility.

    static

    Parameters

    • Default value remoteConfig: __type = {}

      The optional firebase configuration. Provide this configuration if you wish to use the remote controller.

    Returns void

Static stop

  • stop(): void

Static updateVariable

  • updateVariable(variable: Variable, selectedValue: any): void
  • Updates the selected value of a given Variable from the Remixer shared instance.

    static

    Parameters

    • variable: Variable

      The Variable to update.

    • selectedValue: any

      The new selected value.

    Returns void

Generated using TypeDoc