info: fixed missing metadata for some videos and multitrack HEIC
This commit is contained in:
parent
492d9964ad
commit
8d1ab77aa9
1 changed files with 6 additions and 2 deletions
|
@ -33,8 +33,12 @@ class VideoMetadataFormatter {
|
|||
|
||||
static Future<Map> getVideoMetadata(AvesEntry entry) async {
|
||||
final player = FijkPlayer();
|
||||
await player.setDataSourceUntilPrepared(entry.uri);
|
||||
final info = await player.getInfo();
|
||||
final info = await player.setDataSourceUntilPrepared(entry.uri).then((v) {
|
||||
return player.getInfo();
|
||||
}).catchError((error) {
|
||||
debugPrint('failed to get video metadata for entry=$entry, error=$error');
|
||||
return {};
|
||||
});
|
||||
await player.release();
|
||||
return info;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue