繁体   English   中英

为什么 iOS 上的 Flutter 无法播放来自 URL 的音频文件,而只能来自 ZA12A3079E14CED0962EAZ6BA9 的地址?

[英]Why Flutter on iOS can't play an audio file from an URL but only from an IP address?

Does anyone know why Flutter only accepts an IP Address like this http://37.59.41.148:17212/ and not a normal Url like this http://stm16.abcaudio.tv:25584/player.mp3 (I test it in on iPhone)?
我使用了这个 package: url_audio_stream
我也使用过其他软件包,但这是同样的问题。

好吧,我想通了。 对于那些和我有同样问题的人。 要在 IOS 设备上播放 URL,您必须将其放入 Info.plist。

    <key>NSAppTransportSecurity</key>
<dict>
  <!--Include to allow all connections (DANGER)-->
  <key>NSAllowsArbitraryLoads</key>
      <true/>
</dict>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM