Cannot load pepper flash plugin in QtWebEngine with Qt5.6

邮差的信 提交于 2020-01-02 07:25:24

问题


I made a simple web browser but when I access to

https://get.adobe.com/jp/flashplayer/

It says

Adobe Flash Player is already installed, but disabled

However as I read http://doc.qt.io/qt-5/qtwebengine-platform-notes.html It says that pepper flash plugin should be automatically loaded if there is a proper dll file. I checked my C:\Windows\System32\Macromed\Flash\ and I'm sure that I have a pepflashplayer32_21_0_0_213.dll there.

Then I also set

QWebEngineSettings *websetting = QWebEngineSettings::defaultSettings();
websetting->setAttribute(QWebEngineSettings::PluginsEnabled, true);

but still no hopes. Anyone knows how to enable flash with QtWebEngine?


回答1:


OK I got a working answer here:

https://forum.qt.io/topic/66187/cannot-load-pepper-flash-plugin-in-qtwebengine-with-qt5-6/3

For me I have to copy pepflashplayer.dll from chrome. It seems that installed pepflashplayer*.dll from adobe does not work.




回答2:


After installing PepFlashPlayer, you need to enable PPAPI in your application manually (it is disabled by default). Use following code before showing the page:

QWebEngineSettings::globalSettings()->setAttribute(QWebEngineSettings::PluginsEnabled, true);



回答3:


Maybe do it manually with this command line argument:

--ppapi-flash-path=./libpepflashplayer.so

See also the different bug reports relative to this problem : 51774 and 49625.



来源:https://stackoverflow.com/questions/36689786/cannot-load-pepper-flash-plugin-in-qtwebengine-with-qt5-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!