Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-94789

QMediaPlayer Audio playback on Android utterly broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.2
    • 5.15.2
    • Multimedia
    • Android
    • 2023wk50FOQtforAndroid

    Description

       

      It's all described in here:

      https://forum.qt.io/topic/127649/mp3-not-being-played-on-android/13

       

      We've been targeting API 30 running Android 10

       

      Other's having troubles as well: 

      https://forum.qt.io/topic/120741/qmediaplayer-doesn-t-work-on-android-10

      The above could be solved by enabling plaintext data transmission in Manifest. (android 10 requires TLS)

      But the rest is utterly broken anyway. 

       

      If you really need to rely on Android's player which is really a hell to work with and not consistent across APIs then you need give it much more love. Or probably would be better to rely on other MIT based solutions. There are cross platform ones as well which you could incorporate into Qt for audio playback.

       

      For API 26+ you need to handle network traffic this way:

      https://stackoverflow.com/questions/55526505/android-mediaplayer-wont-play-music-on-api-26

       

      So basically it boils down to :

      • the underlying native android player shuts down unexpectedly with with either 
         Unknown MediaEventType(6), ext1=0, ext2=0x0   NOTE: it's all while playing mp3s. Access to QMediaObject synchronized through mutex.
      • OR Unknown MediaEventType(8)
      • There seem to be some serious memory/object management issues, see how the player is enable to operate at all once explicitly created anew
      • all it takes to make it dead is to minimize app's window OR to open a new window/dialog-box.

      This shows https://github.com/lipangit/JiaoZiVideoPlayer/issues/1738 that it might go as far as to the media-handling issues , which we have reported in the past (still unsolved)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            assam Assam Boudjelthia
            vega4 Rafal Skowonski
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes