Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides context to the apps executed within the Media Player.

Usage

import { BlobsController, getMediaInfo } from './brooxMediaPlayer.js';

BlobsController

Parses tuio events recieved by apps and keeps track of the blobs.

// example
const blobsController = new BlobsController(width, height, true, false, () => {...);
const skeletons = blobsController.getSkeletons();

KeyValue

Allows apps to persist json values associated to a project and a key.

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

GestureHandler

Parses OSC events recieved by apps and allows to handle the different gestures.

// example
const gestureHandler = new GestureHandler(500, 2);
gestureHandler.onPresence(() => console.log('Presence'));

OscListener

Listens to OSC events and executes callback functions.

// example
const oscListener = new OscListener();
oscListener.add('/start', () => console.log('Start'));

Functions

Index

Functions

  • downloadFile(url: string, name: string, onUpdate: ((percent: number) => void)): Promise<string>
  • Downloads a file.

    Parameters

    • url: string

      File url.

    • name: string

      File name.

    • onUpdate: ((percent: number) => void)

      Callback function that indicates the percentage of the operation.

      // example
      broox.mediaPlayer.downloadFile(url, name, onUpdate).then(filePath => ...);
        • (percent: number): void
        • Parameters

          • percent: number

          Returns void

    Returns Promise<string>

  • getDeviceInfo(): any
  • getMediaInfo(): any
  • logAlarm(subject: string, text: string): any
  • Logs an alarm.

    Parameters

    • subject: string

      Alarm subject.

    • text: string

      Alarm text.

      // example
      broox.mediaPlayer.logAlarm('Error', e.message);

    Returns any

Generated using TypeDoc