getStream method

Stream<List<int>> getStream(
  1. StreamInfo streamInfo, {
  2. Map<String, String> headers = const {},
  3. bool validate = true,
  4. int start = 0,
  5. int errorCount = 0,
})

Implementation

Stream<List<int>> getStream(StreamInfo streamInfo,
    {Map<String, String> headers = const {},
    bool validate = true,
    int start = 0,
    int errorCount = 0}) {
  if (streamInfo.fragments.isNotEmpty) {
    // DASH(fragmented) stream
    return _getFragmentedStream(streamInfo,
        headers: headers,
        validate: validate,
        start: start,
        errorCount: errorCount);
  }
  // Normal stream
  return _getStream(streamInfo,
      headers: headers,
      validate: validate,
      start: start,
      errorCount: errorCount);
}