I embed youtube within QML WebEngineView. Everything is working fine but only the autoplay is not working. I try to add ( ?autoplay=1 ) after URL as this answer How can I autoplay a video using the new embed code style for Youtube? but It still not working.
Here is my QML code.
ApplicationWindow {
    id: root
    visible: true
    width: 576; height: 400
    title: "Test"
    x: 0;y: 0;
    WebEngineView {
        id: webViewID
        anchors.fill: parent
        backgroundColor: "black"
    }
    Component.onCompleted: {
        webViewID.loadHtml('<iframe id="ms-youtube" width="100%" height="100%" src="https: //www.youtube.com/embed/-mN3VyJuCjM?autoplay=1 " title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>')
    }
}
 
    