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

QMediaPlayer changing source doesn't work on Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • 6.2.0, 6.2.1, 6.3.0 Alpha, 6.2
    • 6.2.0 RC
    • Multimedia
    • None
    • Android Version 11
      Android ABI 30
      NDK 21.3.6528147
    • Android

    Description

      When swapping the source for a QMediaPlayer and starting the player again the old music gets played instead of the newly changed/loaded one.
      Steps i'm doing:
      1. Having an android app with multiple mp3 files added as qrc-file directly compiled to the app.
      2. Create the QMediaPlayer and set the QAudioDevice to the default one
      3. Call setSource with a qrc-QUrl
      4. Call start --> the music plays as expected.
      5. stop the player.
      6. Call setSource with a different qrc-QUrl
      7. Call start --> the initial music plays instead of the set one.
      The steps 5 to 7 can be repeated indefinetly but always the first loaded music gets played.

      Additional Information:
      The same code worked with Qt 6.2 Beta 3.
      The same code also works fine on windows with msvc.

      Attachments

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

        Activity

          People

            samuelmira Samuel Mira
            robosturm Tilman Sandhoff
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes