[SOLVED] Embedding flash player into a QtWebKit application.
-
wrote on 28 Dec 2011, 06:13 last edited by
Actually Qwebkit looks for NPSWF32.dll adobe plugin for playing the flash content.
You may find this dll under adobe installed directory on your system.and add the below mention line in you code.
@
QWebView* webViewChild = new QWebView;
webViewChild->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
@[EDIT: code formatting, Volker]
-
wrote on 1 Jan 2012, 00:32 last edited by
Hi, that you for replying.
Yes, the Webkit looks for the standard plugin location.
I was wondering whether there is a way to specify the
directory which it will look for the plugin. That way I could
just deploy the app with a copy of the NPSWF32.dll file and
the Webkit will run Flash content out of the box. It won't
matter if the 'user' has the plugin installed. -
wrote on 1 Jan 2012, 18:16 last edited by
I don't know does the Adobe Flash is distributed with rights "to distribute it" with your program. It may be illegal.
-
wrote on 1 Jan 2012, 18:28 last edited by
According to the sources in 4.8[1] the paths set in the environment variable QTWEBKIT_PLUGIN_PATH are also search for plugins. You might give that a try. Be aware to set the environment before instantiating any webkit classes.
fn1. "src/3rdparty/webkit/Source/WebCore/plugins/PluginDatabase.cpp":http://qt.gitorious.org/qt/qt/blobs/4.8/src/3rdparty/webkit/Source/WebCore/plugins/PluginDatabase.cpp#line419
-
wrote on 9 Feb 2012, 14:21 last edited by
Hello,
I can't find a way to set this environment variable: QTWEBKIT_PLUGIN_PATH.
I don't have any experience doing these procedures before.Could you please give me some pointer? or a short code example?
Thank you
-
wrote on 9 Feb 2012, 14:26 last edited by
Hi,
you can not distribute Adobe plugins binaries along with your application.
In the installation pacakge of your project ask user to download the latest plugin from the adobe website.
It is against the copyright to distribute adobe dll's with third party app. -
wrote on 9 Feb 2012, 14:46 last edited by
[quote author="Ashish Mittal" date="1328797569"]Hi,
you can not distribute Adobe plugins binaries along with your application.
In the installation pacakge of your project ask user to download the latest plugin from the adobe website.
It is against the copyright to distribute adobe dll's with third party app.
[/quote]Thank you for your reply.
I still would like to know how to do the procedure indicated by Volker.
[quote author="Volker" date="1325442522"]According to the sources in 4.8[1] the paths set in the environment variable QTWEBKIT_PLUGIN_PATH are also search for plugins. You might give that a try. Be aware to set the environment before instantiating any webkit classes.
fn1. "src/3rdparty/webkit/Source/WebCore/plugins/PluginDatabase.cpp":http://qt.gitorious.org/qt/qt/blobs/4.8/src/3rdparty/webkit/Source/WebCore/plugins/PluginDatabase.cpp#line419[/quote]
-
wrote on 9 Feb 2012, 23:24 last edited by
@
qputenv("QTWEBKIT_PLUGIN_PATH", "/path/to/the/plugin/directory");
@ -
wrote on 10 Feb 2012, 02:08 last edited by
[quote author="Volker" date="1328829852"]@
qputenv("QTWEBKIT_PLUGIN_PATH", "/path/to/the/plugin/directory");
@[/quote]That's it. That's the command I needed.
Thank you very much.
-
wrote on 10 Feb 2012, 22:19 last edited by
You're welcome. If your issue is solved, it would be nice to add [Solved] to the topic. Just hit the edit link to the right of the very first post and adjust the title. Thanks!
-
wrote on 10 Feb 2012, 22:24 last edited by
Hi,
Thank you again, I was going to do that but
I thought there was a more systematic way for doing so (and didn't find it). -
wrote on 10 Feb 2012, 22:27 last edited by
Thanks!
The QnQ forums feature is in the works. It will come some time soon. You can have a look at the new features in the "QnA Testing Area":/forums/viewforum/46/ - feel free to play around there, it's there just for testing purpose and we're supposed to "take it apart" ("MariusG":/member/2) :-)
-
wrote on 15 Jan 2013, 12:42 last edited by
I've found solution, that works for me in Qt 4.8.
I'm creating a directory named
plugins
in the same directory that the my app executable and Qt libraries located in, and copyNPSWF32.dll
inside it. After that application starts to recognize flash content. -
wrote on 3 Aug 2015, 10:17 last edited by
qputenv("QTWEBKIT_PLUGIN_PATH","C:\Windows\SysWow64\Macromed\Flash");