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

QMediaPlayer changing source doesn't work on Android

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Duplicate
    • Affects Version/s: 6.2.0 RC
    • Fix Version/s: 6.2.0, 6.2.1, 6.2, 6.3.0 Alpha
    • Component/s: Multimedia
    • Labels:
      None
    • Environment:
      Android Version 11
      Android ABI 30
      NDK 21.3.6528147
    • Platform/s:
      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

            Assignee:
            samuelmira Samuel Mira
            Reporter:
            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