Open sunilguptasg opened 2 years ago
Feel free to submit a fix. I never used web in any of my Flutter projects, it's just something I added to complete the set. Other than that, I wouldn't use this to get duration, but official web audio or video APIs, primary purpose of this plugin is to read tags.
Uint8List byteString = await pickedFile.readAsBytes(); <<pickedFile is XFile Metadata videoMetaData = await MetadataRetriever.fromBytes(byteString); int? dur = videoMetaData.trackDuration; << returns null
Note: I have added this script in the
section of index.htmlalso the code crashes on this line line 110 of flutter_media_metadata_web.dart:'albumArt': base64Decode(rawMetadataJson['Cover_Data']),
I'm basically struggling to get the duration of a picked video file on the web.