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

MediaPlayer with VideoOutput doesn't autoplay

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.7.1, 6.8.0 FF
    • 6.5.3
    • Multimedia
    • None
    • Windows 10 with Chrome 117
    • WebAssembly
    • 36fd68094 (dev), 6d36c99cb (6.7)

      When launching the webapp with a local video file chrome prevents autoplay and video doesn't get loaded.

       

       

                      MediaPlayer
                      {
                          id: mp
                          source: "qrc:/res/smile.mp4"
                          loops: MediaPlayer.Infinite
                          videoOutput: video
                          audioOutput: AudioOutput{ muted: true}
                          activeAudioTrack: -1                    
                          Component.onCompleted:
                          {
                              play()
                          }
                      } 

      it doesn't work either with or without audioOutput set with muted: true
      Reason: Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD

      To be able to autoplay the html video element has to have muted parameter set.

       

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

            lpotter Lorn Potter
            victor.corchez Victor Corchez
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes