Unable to load YouTube Player API (IFrame_API) using QtWebengine, QtWenengineView and QtWebcannel in QT6
-
wrote on 4 Sept 2023, 06:31 last edited by
I am using YouTube Player in one of my application.
I am using QWebengine, QWenengineView and QWebcannel to load the youtube player api ("https://www.youtube.com/iframe_api") using IFrames in HTML and javascript. It is loaded succesfully and a function named onYouTubeIframeAPIReady() was automatically called when API is successfully loaded.
This thing is working fine in QT5, but when I ported this application to QT6, the API is not getting loaded and the function onYouTubeIframeAPIReady() is not getting called automatically.
There is no change in source code.
I tried a lot of things and looked for changes in these QT classes from QT5 to QT6, but did not find any specific thing related to this.
When I directly open the HTML in web browser rather than invoking it from QT, it is succesfully loaded, but unsuccessful when I load it from QT.I doubt the reason may be some change in QTWebengine from QT5 to QT6 due to which it is unable to load the player API.
Can anybody analyze and find out what may be the possible reason and how to resolve it ?
1/1