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