Hello everyone,

I wonder if anyone tried to use Web MIDI on WebEngine? I just tried to run a 
simple program to test if the api exists and works which looks like this,

if (navigator.requestMIDIAccess) {
    console.log('Browser supports MIDI!');
    navigator.requestMIDIAccess()
        .then(success, failure);
}
else {
    console.warn('Browser not supports MIDI!');
}

function success (midi) {
    console.log('Got midi!', midi);
}

function failure () {
    console.error('No access to your midi devices.')
}

and the output was:

Browser supports MIDI!
No access to your midi devices.

So seems like the API exists since the first if-statement gets executed but for 
some reason requesting MIDI access, requestMIDIAccess, doesn't work. Oh, btw, I 
grant all feature requests by calling grantFeaturePermission function which 
looks like this,

WebEngineView {
    onFeaturePermissionRequested: {
        grantFeaturePermission(securityOrigin, feature, true)
    }
}

So my question, does WebEngine supports Web MIDI? If yes, do I need to do a 
specific configuration or build to make it work?

Best,
Sina
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to