On iOS in Xamarin.Forms, when playing a remote mp3, Duration is always zero {0:00:00}. Furthermore the MetadataUpdated event doesn't fire, even when metadata is loaded (IsMetadataExtracted is true).
The audio plays, but Duration is always 0. I've tried several mp3s, including the one in the wiki.
Expected behavior
MediaItem.Duration is non-zero after metadata loads. (The example mp3 is 0:04:30)
mediaItem.MetadataUpdated event gets fired when metadata loads.
Reproduction steps
CrossMediaManager.Current.StateChanged += (sender, e) => {
if (e.State == MediaManager.Player.MediaPlayerState.Playing)
{
var duration = CrossMediaManager.Current.Queue.Current.Duration; // Duration is zero {0:00:00}
}
};
var mediaItem = await CrossMediaManager.Current.Play("https://ia800806.us.archive.org/15/items/Mp3Playlist_555/AaronNeville-CrazyLove.mp3");
mediaItem.MetadataUpdated += (sender, args) => {
// This never fires on iOS
var duration = args.MediaItem.Duration;
};
Configuration
Version: 0.9.7 to 0.9.9, Xamarin.Forms 4.7.0 to 4.8.0.1269
🐛 Bug Report
On iOS in Xamarin.Forms, when playing a remote mp3, Duration is always zero {0:00:00}. Furthermore the MetadataUpdated event doesn't fire, even when metadata is loaded (IsMetadataExtracted is true).
The audio plays, but Duration is always 0. I've tried several mp3s, including the one in the wiki.
Expected behavior
Reproduction steps
Configuration
Version: 0.9.7 to 0.9.9, Xamarin.Forms 4.7.0 to 4.8.0.1269
Platform: