Options
All
  • Public
  • Public/Protected
  • All
Menu

Stores and retrieves values in json format. Allows to persist data and be able to retrieve it after the media changes or the Media Player is reloaded. It can be useful for persisting configuration parameters modified at runtime. A project name and a key need to be specified in order to store and retrieve the data.

Hierarchy

  • KeyValue

Index

Constructors

Methods

Constructors

Methods

  • getValue(name: string, key: string): any
  • Gets a value from a content in storage

    Parameters

    • name: string

      File name

    • key: string

      Key

    Returns any

    The value for the given key

    // example
    const keyValue = new broox.mediaPlayer.KeyValue();
    const user = keyValue.get('testApp', 'profile');
    console.log('User', user);
  • setValue(name: string, key: string, value: any): void
  • Sets a value in storage

    Parameters

    • name: string

      File name

    • key: string

      Key assigned to the value to store

    • value: any

      Value to store

      // example
      const user = {
      firstName: 'John',
      lastName: 'Doe'
      };
      const keyValue = new broox.mediaPlayer.KeyValue();
      keyValue.set('testApp', 'profile', user);

    Returns void

Generated using TypeDoc