[Solved]Can QWebEngineView load and play local multimedia files?

  • Hi.
    i know about security but it is no problem for me.
    i was tried with varius ways but no success.
    From html:
    <video crossorigin='blah' src='foo.mp4'/>
    From js:

    var filepicker = document.getElementById("file").files[0]
    var player = document.getElementById("player")
    player.src = URL.createObjectURL(filepicker)

    From cpp:

    QWebEngineView* web = new QWebEngineView();

    When page loaded i can see video element. But it seems like disabled as no 'src'.
    But everythings fine with youtube.
    Are there a way for this?


  • Well. 'ogg' audios and 'webm' videos are playable but 'mp3' and 'mp4' formats not playable.

    Are 'mp3' and 'mp4' formats banned by Qt devs? If so; is because legal/third-party issues?

    Similar q already asked there.


    Thanks a lot.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Here you have the explanation

  • @SGaist: that's exact answer i am looking for. Thank you.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.