getMuxededStreams method
Future<Map<String, dynamic> >
getMuxededStreams(
- String videoId, {
- int audioBitrate = 192,
- String videoQuality = '1080p',
- String? audioCodec,
- String? videoCodec,
- bool includeVideo = true,
- bool includeAudio = true,
override
Gets unified streams (video + audio) for a YouTube video
Implementation
@override
Future<Map<String, dynamic>> getMuxededStreams(
String videoId, {
int audioBitrate = 192,
String videoQuality = '1080p',
String? audioCodec,
String? videoCodec,
bool includeVideo = true,
bool includeAudio = true,
}) async {
try {
final result = await methodChannel
.invokeMethod<Map<dynamic, dynamic>>('getUnifiedStreams', {
'videoId': videoId,
'audioBitrate': audioBitrate,
'videoQuality': videoQuality,
if (audioCodec != null) 'audioCodec': audioCodec,
if (videoCodec != null) 'videoCodec': videoCodec,
'includeVideo': includeVideo,
'includeAudio': includeAudio,
});
return _convertUnifiedResult(result);
} on PlatformException catch (e) {
throw PlatformException(
code: e.code,
message: e.message,
details: e.details,
);
}
}