### Hierarchy

- EventDispatcher

### Implemented by

- Publisher
- Session
- Subscriber

## Index

### Methods

- off
- on
- once

## Methods

### off

- off(type: string, handler?: function): any

- - Defined in OpenViduInternal/Interfaces/Public/EventDispatcher.ts:35

  Removes a `handler` from event `type`. If no handler is provided, all handlers will be removed from the event

  #### Parameters

  - ##### type: string

  - ##### Optional handler: function

    - - (event: Event): void

      - #### Parameters

        - ##### event: Event

        #### Returns void

  #### Returns any

### on

- on(type: string, handler: function): EventDispatcher

- - Defined in OpenViduInternal/Interfaces/Public/EventDispatcher.ts:25

  Adds function `handler` to handle event `type`

  #### Parameters

  - ##### type: string

  - ##### handler: function

    - - (event: Event): void

      - #### Parameters

        - ##### event: Event

        #### Returns void

  #### Returns EventDispatcher

### once

- once(type: string, handler: function): any

- - Defined in OpenViduInternal/Interfaces/Public/EventDispatcher.ts:30

  Adds function `handler` to handle event `type` just once. The handler will be automatically removed after first execution

  #### Parameters

  - ##### type: string

  - ##### handler: function

    - - (event: Event): void

      - #### Parameters

        - ##### event: Event

        #### Returns void

  #### Returns any

Generated using TypeDoc