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

Qt Multimedia Audio QML type fails to play if autoLoad is set to false

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P1: Critical P1: Critical
    • None
    • 5.15.0
    • Multimedia
    • None
    • Linux/Wayland

      I don't want to preload sounds to keep page loading costs down. On Qt 5.10.1 I can do this by setting Audio.autoLoad to false. On Qt 5.15.0 on the same machine nothing is played when calling play() method if autoLoad is set to false. Doesn't matter if the clip is wav or mp3.

      import QtQuick 2.0
      import QtMultimedia 5.0
      
      MouseArea {
          onClicked: audio.play() // no audio gets played
      
          width: 100
          height: 100
      
          Audio {
              id: audio
              autoLoad: false
              source: "clip.mp3"
          }
      }
      

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

            valentyn.doroshchuk Valentyn Doroshchuk
            jpetrell Joona Petrell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes