Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. [SOLVED] Embedding flash player into a QtWebKit application.
Forum Update on Monday, May 27th 2025

[SOLVED] Embedding flash player into a QtWebKit application.

Scheduled Pinned Locked Moved Qt WebKit
20 Posts 6 Posters 30.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    serpulga
    wrote on 13 Dec 2011, 23:46 last edited by
    #1

    Hello,
    I'm developing a QtWebKit based application and I need it to support flash player
    out of the box.
    I already have flash content working by installing the Mozilla flash player plugin and
    enabling plugins in the application's web settings. However, I would like to know if
    there's a way for the application to support flash content from start, without
    having to install a separate plugin. The same Google Chrome works.

    Thank you

    Sergio

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pacanek
      wrote on 14 Dec 2011, 10:01 last edited by
      #2

      From what I know you need to put plugin in any path specified in http://doc.qt.nokia.com/latest/qtwebkit.html (ctrl+f "Netscape Plugin Support") and enable plugins in settings.

      You may also try to modify QWebPluginFactory

      1 Reply Last reply
      0
      • S Offline
        S Offline
        serpulga
        wrote on 14 Dec 2011, 14:18 last edited by
        #3

        Hello, thank you for replying.
        And what would the plugin be?, the one
        dll file that comes with flash?

        1 Reply Last reply
        0
        • P Offline
          P Offline
          pacanek
          wrote on 14 Dec 2011, 14:53 last edited by
          #4

          I'm not a Windows specialist. For Linux it would be one file libflash.so

          as I found there's more files in C:\WINDOWS\system32\Macromed\Flash
          You need to figure out it yourself. You should be able to remove flash and copy the dll to your executable directory and try it.

          Hope I've helped you.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            serpulga
            wrote on 14 Dec 2011, 15:34 last edited by
            #5

            Yes I tried coping those files that but it didn't work.
            I guess I'll have to figure out what files are the webkit looking for exactly, and
            where.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              aashish.lg
              wrote on 28 Dec 2011, 06:13 last edited by
              #6

              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]

              1 Reply Last reply
              0
              • S Offline
                S Offline
                serpulga
                wrote on 1 Jan 2012, 00:32 last edited by
                #7

                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.

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  pacanek
                  wrote on 1 Jan 2012, 18:16 last edited by
                  #8

                  I don't know does the Adobe Flash is distributed with rights "to distribute it" with your program. It may be illegal.

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    goetz
                    wrote on 1 Jan 2012, 18:28 last edited by
                    #9

                    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

                    http://www.catb.org/~esr/faqs/smart-questions.html

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      serpulga
                      wrote on 9 Feb 2012, 14:21 last edited by
                      #10

                      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

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        aashish.lg
                        wrote on 9 Feb 2012, 14:26 last edited by
                        #11

                        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.

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          serpulga
                          wrote on 9 Feb 2012, 14:46 last edited by
                          #12

                          [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]

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            goetz
                            wrote on 9 Feb 2012, 23:24 last edited by
                            #13

                            @
                            qputenv("QTWEBKIT_PLUGIN_PATH", "/path/to/the/plugin/directory");
                            @

                            http://www.catb.org/~esr/faqs/smart-questions.html

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              serpulga
                              wrote on 10 Feb 2012, 02:08 last edited by
                              #14

                              [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.

                              1 Reply Last reply
                              0
                              • G Offline
                                G Offline
                                goetz
                                wrote on 10 Feb 2012, 22:19 last edited by
                                #15

                                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!

                                http://www.catb.org/~esr/faqs/smart-questions.html

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  serpulga
                                  wrote on 10 Feb 2012, 22:24 last edited by
                                  #16

                                  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).

                                  1 Reply Last reply
                                  0
                                  • G Offline
                                    G Offline
                                    goetz
                                    wrote on 10 Feb 2012, 22:27 last edited by
                                    #17

                                    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) :-)

                                    http://www.catb.org/~esr/faqs/smart-questions.html

                                    1 Reply Last reply
                                    0
                                    • E Offline
                                      E Offline
                                      Envek
                                      wrote on 15 Jan 2013, 12:42 last edited by
                                      #18

                                      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 copy NPSWF32.dll inside it. After that application starts to recognize flash content.

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        MtDewQt
                                        wrote on 3 Aug 2015, 10:17 last edited by
                                        #19

                                        qputenv("QTWEBKIT_PLUGIN_PATH","C:\Windows\SysWow64\Macromed\Flash");

                                        M 1 Reply Last reply 3 Aug 2015, 10:21
                                        0
                                        • M MtDewQt
                                          3 Aug 2015, 10:17

                                          qputenv("QTWEBKIT_PLUGIN_PATH","C:\Windows\SysWow64\Macromed\Flash");

                                          M Offline
                                          M Offline
                                          MtDewQt
                                          wrote on 3 Aug 2015, 10:21 last edited by
                                          #20

                                          @MtDewQt

                                          qputenv("QTWEBKIT_PLUGIN_PATH","C:\Windows\SysWow64\Macromed\Flash");
                                          
                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved