You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I started using my app on the iOS instead of android and i found that on android files play normally and work as they should. But on the iOS they seem to be somehow corrupted. They cant be played, even using app like VLC. It shows the duration of the files (sometimes) and the size seems to be ok. I tried both downloading mp3 and aac but non of these work.
To Reproduce
Include the code which doesn't work in the code markdown..
Future<void> download(
String id, BuildContext context, String title, bool useSnacker) async {
String basePath =awaitgetAppSpecificFilesDir();
finalString mp3Path ="$basePath/mp3/$id.mp3";
finalString thumbnailPath ="$basePath/thumbnails/$id.jpg";
awaitcreateFolders(basePath);
awaitdownloadThumbnail(thumbnailPath, id);
// Check if file already exists or if path is invalidif (basePath ==""||awaitFile(mp3Path).exists()) {
return;
}
final manifest =await yt.videos.streamsClient.getManifest(id);
final streamInfo = manifest.audioOnly.withHighestBitrate();
var stream = yt.videos.streamsClient.get(streamInfo);
// Open a file for writing.var file =File(mp3Path);
var fileStream = file.openWrite();
if (useSnacker) {
Snacker().show(
context: context,
contentType:ContentType.warning,
title:"Downloading started...",
message: title,
);
}
// Write the stream to the file.await stream.pipe(fileStream);
// Close the file.await fileStream.flush();
await fileStream.close();
//wait for the thumbnail to be downloaded and then show the snackbarwhile (!awaitFile(thumbnailPath).exists()) {
awaitFuture.delayed(constDuration(milliseconds:100));
}
if (useSnacker) {
Snacker().show(
context: context,
contentType:ContentType.success,
title:"Download complete!",
message: title,
);
}
print("Download for $id complete!");
}
Enviroment: (please complete the following information):
Enviroment: [Flutter o Dart VM]
Version 3.7.12
YoutubeExplode Version 1.12.3
EDIT
It seems that final streamInfo = manifest.audioOnly.withHighestBitrate(); was making problems, when i changed it to final streamInfo = manifest.muxed.withHighestBitrate(); it solved it.
The text was updated successfully, but these errors were encountered:
Describe the bug
I started using my app on the iOS instead of android and i found that on android files play normally and work as they should. But on the iOS they seem to be somehow corrupted. They cant be played, even using app like VLC. It shows the duration of the files (sometimes) and the size seems to be ok. I tried both downloading mp3 and aac but non of these work.
To Reproduce
Include the code which doesn't work in the code markdown..
Enviroment: (please complete the following information):
EDIT
It seems that
final streamInfo = manifest.audioOnly.withHighestBitrate();
was making problems, when i changed it tofinal streamInfo = manifest.muxed.withHighestBitrate();
it solved it.The text was updated successfully, but these errors were encountered: