Class MKGeoComplyController

MKPlayer GeoComply Controller.

Gates playback behind GeoComply location verification. One controller can be attached to multiple players via attachPlayer (e.g. a multiview grid); the underlying token cache is shared across all of them.

Use loadSource in place of player.load() -- it refreshes the cached location token first if needed, before the roll is made. A roll failure clears the cached token, so the next load always fetches a fresh one instead of retrying with a token already known to be rejected.

Hierarchy

  • MKGeoComplyController

Constructors

Methods

  • Attaches this controller to a player, e.g. one call per player in a multiview grid. Registers the cached location token as that player's GeoComply location provider. Safe to call more than once for the same player -- only attaches on the first call.

    Parameters

    • player: MKPlayerAPI

      the player to attach to.

    • Optional options: {
          externalTokenOnly?: boolean;
      }
      • Optional externalTokenOnly?: boolean

        true for a player with no local KSS/authorize/verify capability, e.g. a connected device relying on setExternalGeoComplyLocationToken.

    Returns void

  • Detaches a player: removes its listeners, unregisters its location provider, and forgets its state. Called automatically on that player's Destroy.

    Parameters

    • player: MKPlayerAPI

      the player to detach.

    Returns void

  • Get plugin version string.

    Returns string

  • Loads a source on an attached player, in place of calling player.load() directly. Refreshes the cached location token first if it's missing or expired.

    Parameters

    • player: MKPlayerAPI

      the attached player to load on.

    • sourceConfig: MKSourceConfig

      the source to load.

    Returns Promise<void>

  • Full teardown -- detaches every currently attached player.

    Returns void