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

Android: MediaPlayer: AudioOutput via HDMI not possible

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.7.0 RC, 6.8.0 FF
    • 6.6.2
    • Multimedia
    • None
    • Android
    • 97d029980 (dev), 2fa7c4dfd (6.7)

      When playing a video on a FireTV stick, the sound is not audible.
      When trying to select "HDMI" as audio output, "Output device not set" is printed to the console.
      The reason for this is that QtAudioDeviceManager::setAudioOutput doesn't support AudioDeviceInfo.TYPE_HDMI.

      Example code:
      Since the ffmpeg backend is currently unable to play HLS steams (QTBUG-118168), the native backend is used:

      qputenv("QT_MEDIA_BACKEND", "android");
      import QtQuick
      import QtQuick.Controls
      import QtMultimedia
      
      ApplicationWindow {
          visible: true
      
          MediaDevices {
              id: devices
          }
      
          MediaPlayer {
              id: mediaplayer
              source: "https://hls-master.video.pareygo.de/1adbe4a13e6f65fc282ce1ceef22117c.m3u8"
              audioOutput: AudioOutput {
                  Component.onCompleted: {
                      for(var audioDevice in devices.audioOutputs)
                      {
                          if(devices.audioOutputs[audioDevice].description.startsWith("HDMI"))
                          {
                              device = devices.audioOutputs[audioDevice]
                          }
                      }
                  }}
              videoOutput: videoOutput
          }
      
          VideoOutput {
              id: videoOutput
              anchors.fill: parent
          }
      
          Component.onCompleted: mediaplayer.play()
      }
      

       

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

            laknoll Lars Knoll
            p.heimann Paul Heimann
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes