# Class: ThroughputController

## ThroughputController

#### new ThroughputController()

  Source:
    - streaming/controllers/ThroughputController.js, line 43

### Methods

#### <inner> getAverageLatency(mediaType, calculationMode, sampleSize)

  Returns the average latency based on the provided calculation mode

  ##### Parameters:

  Name | Type | Default | Description
  --- | --- | --- | ---
  `mediaType` | string |  |
  `calculationMode` | string | null | null |
  `sampleSize` | number | NaN |  |

  Source:
    - streaming/controllers/ThroughputController.js, line 427

  ##### Returns:

  Type
    number

#### <inner> getAverageThroughput(mediaType, calculationMode, sampleSize)

  Returns the average throughput based on the provided calculation mode. The returned value is depicted in kbit/s

  ##### Parameters:

  Name | Type | Default | Description
  --- | --- | --- | ---
  `mediaType` | string |  |
  `calculationMode` | string | null | null |
  `sampleSize` | number | NaN |  |

  Source:
    - streaming/controllers/ThroughputController.js, line 397

  ##### Returns:

  Type
    number

#### <inner> getRawThroughputData(mediaType)

  Returns the raw throughput measurements without calculating the average

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `mediaType` |  |

  Source:
    - streaming/controllers/ThroughputController.js, line 438

  ##### Returns:

  Type
    *

#### <inner> getSafeAverageThroughput(mediaType, calculationMode, sampleSize)

  Returns the average throughout applying the bandwidth safety factor provided in the settings. The returned value is depicted in kbit/s

  ##### Parameters:

  Name | Type | Default | Description
  --- | --- | --- | ---
  `mediaType` | string |  |
  `calculationMode` | string | null | null |
  `sampleSize` | number | NaN |  |

  Source:
    - streaming/controllers/ThroughputController.js, line 410

  ##### Returns:

  Type
    number

#### <inner> getZlema(dict, sampleSize)

  Calculates the Zero-Lag Exponential Moving Average

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `dict` | array |
  `sampleSize` | number |

  Source:
    - streaming/controllers/ThroughputController.js, line 369

  ##### Returns:

  Type
    number

#### Search results