[Solved]Can QWebEngineView load and play local multimedia files?
i know about security but it is no problem for me.
i was tried with varius ways but no success.
<video crossorigin='blah' src='foo.mp4'/>
var filepicker = document.getElementById("file").files var player = document.getElementById("player") player.src = URL.createObjectURL(filepicker)
QtWebEngine::initialize(); QWebEngineView* web = new QWebEngineView(); web->page()->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls,true); web->page()->setFeaturePermission(QUrl("file:///home/me/test.html"),QWebEnginePage::MediaAudioVideoCapture,QWebEnginePage::PermissionGrantedByUser);
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.
Hi and welcome to devnet,
Here you have the explanation
@SGaist: that's exact answer i am looking for. Thank you.