0

i want to play a mp3 using a http url,so i found Qt5 MediaPlayer. But i get a issue,when i set player->setMedia(QUrl('http://xxx'));.

2016-01-02 01:46:02.544 myPlayer[82519:5587404] App Transport Security     has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

i found this, but i don't know how to add NSAllowsArbitraryLoads to info.plist.

Community
  • 1
  • 1
cong chen
  • 55
  • 6

1 Answers1

0

You should create info.plist file for your application. Then at your .pro file add this:

QMAKE_INFO_PLIST = Info.plist

From Qt documentation:

QMAKE_INFO_PLIST

Specifies the name of the property list file, .plist, you would like to include in your OS X and iOS application bundle.

In the .plist file, you can define some variables, e.g., @EXECUTABLE@, which qmake will replace with the actual executable name. Other variables include @ICON@, @TYPEINFO@, @LIBRARY@, and @SHORT_VERSION@.

Evgeny
  • 3,910
  • 2
  • 20
  • 37