Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Filter

WARNING: experimental option. This interface may change in the near future

Video/audio filter applied to a Stream. See Stream.applyFilter

Hierarchy

  • Filter

Index

Properties

Optional lastExecMethod

lastExecMethod: undefined | object

Value passed the last time Filter.execMethod was called. If undefined this method has not been called yet.

You can use this value to know the current status of any applied filter

options

options: Object

Parameters used to initialize the filter. These correspond to the constructor parameters used in the filter in Kurento Media Server (except for mediaPipeline parameter, which is never needed).

For example: for filter.type = "GStreamerFilter" could be filter.options = {"command": "videobalance saturation=0.0"}

You can get this property in *.kmd.json files defining the Kurento filters. For example, for GStreamerFilter that's here

type

type: string

Type of filter applied. This is the name of the remote class identifying the filter to apply in Kurento Media Server. For example: "FaceOverlayFilter", "GStreamerFilter".

You can get this property in *.kmd.json files defining the Kurento filters. For example, for GStreamerFilter that's here

Methods

addEventListener

  • addEventListener(eventType: string, handler: function): Promise<any>
  • Subscribe to certain filter event. Available events are specific for each filter

    Parameters

    • eventType: string

      Event to which subscribe to.

    • handler: function

      Function to execute upon event dispatched. It receives as parameter a FilterEvent object

    Returns Promise<any>

    A Promise (to which you can optionally subscribe to) that is resolved if the event listener was successfully attached to the filter and rejected with an Error object if not

execMethod

  • execMethod(method: string, params: Object): Promise<any>
  • Executes a filter method. Available methods are specific for each filter

    Parameters

    • method: string

      Name of the method

    • params: Object

      Parameters of the method

    Returns Promise<any>

removeEventListener

  • removeEventListener(eventType: string): Promise<any>
  • Removes certain filter event listener previously set.

    Parameters

    • eventType: string

      Event to unsubscribe from.

    Returns Promise<any>

    A Promise (to which you can optionally subscribe to) that is resolved if the event listener was successfully removed from the filter and rejected with an Error object in other case

Generated using TypeDoc