idofilus / flutter_audio

Flutter Audio Plugin
MIT License
15 stars 14 forks source link

Audio Not Playing In iOS but changes AudioStates #26

Closed lekeCoder closed 4 years ago

lekeCoder commented 4 years ago

Hello,

I implemented this plugin in my flutter app and it plays audio downloaded to the device in Android but not in iOS. In iOS device, it will change AudioState but does not play out irrespective of the volume. What can I do?

mr-52hz commented 4 years ago

Hello,

I implemented this plugin in my flutter app and it plays audio downloaded to the device in Android but not in iOS. In iOS device, it will change AudioState but does not play out irrespective of the volume. What can I do?

Have you solved it?How?

HugoHeneault commented 4 years ago

I have the same issue, on some devices it's working (ie iPhone SE) on other it doesn't (ie. iPhone 6)

Any ideas?

HugoHeneault commented 4 years ago

So I solved it by adding

   <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>

To my main Info.plist file

mr-52hz commented 4 years ago

thank you very much!

lekeCoder commented 4 years ago

So I solved it by adding

   <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>

To my main Info.plist file

I solved this problem by using another package which did not require me to change my info.plist file. You can check the package here https://pub.dev/packages/audio#-readme-tab-