bluefireteam / audioplayers

A Flutter package to play multiple audio files simultaneously (Android/iOS/web/Linux/Windows/macOS)
https://pub.dartlang.org/packages/audioplayers
MIT License
2.01k stars 845 forks source link

fix: getDuration() for iOS #1817

Closed mavzerbay closed 2 weeks ago

mavzerbay commented 4 months ago

Description

Android setSourceUrl working fine, but for iOS its return 0 or null every time. When I examined your codes, I saw a condition made for android and I wrote a condition for iOS. It may not be a very successful fix, but it solved my job a lot.

Checklist

Breaking Change

Related Issues

https://github.com/bluefireteam/audioplayers/issues/1578

Gustl22 commented 3 weeks ago

Hey there sorry for letting you wait so long. Thank you for contributing! The issue you mentioned to fix was meant for Android with OPUS codec. This fix is for iOS. Can you first give us a reproducible example of what you try to fix? It seems that this change just downloads every iOS source and handles it as device file, which is not how every source should be handled.

github-actions[bot] commented 2 weeks ago

This issue was closed by the changes-requested bot due to inactivity.