Page 1 of 2 12 LastLast
Results 1 to 20 of 38

Thread: Running flash .swf files in widget?

  1. #1
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question Running flash .swf files in widget?

    Dear Everyone!
    I want to run flash file .swf in my widget. At a moment I am using gnash for it.
    But It is not working good.
    There is a problem of resizing object as well as it cannot render object completely.

    So any other way is available to run flash .swf files in widget.
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  2. #2
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Thanks
    7
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Running flash .swf files in widget?

    Try using some freware flashPlayer(adobe or shockwave) as activeX - works good for me.

  3. #3
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Running flash .swf files in widget?

    Quote Originally Posted by mchara View Post
    Try using some freware flashPlayer(adobe or shockwave) as activeX - works good for me.
    for Fedora 6 which is prefrable.
    Sir! may u give any example?
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  4. #4
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Running flash .swf files in widget?

    Under X11, you could use XEmbed and QX11EmbedContainer to embed the proprietary flash player in a window.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Running flash .swf files in widget?

    WebKit might soon be a good choice too. Provided that it can run netscape (or some other) plugins...

  6. #6
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question Re: Running flash .swf files in widget?

    Quote Originally Posted by wysota View Post
    WebKit might soon be a good choice too. Provided that it can run netscape (or some other) plugins...
    I am using WebKit in my application but it is not opening flash files, however it opens html files. How to open flash files using webkit?
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  7. #7
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Running flash .swf files in widget?

    Quote Originally Posted by ashukla View Post
    I am using WebKit in my application but it is not opening flash files, however it opens html files. How to open flash files using webkit?
    What I do for above this?
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Running flash .swf files in widget?

    I don't feel qualified to answer the question. If WebKit doesn't support netscape (or other) plugins, then it won't play flash movies. Period. Hence the "provided" part in my previous post.

  9. #9
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Running flash .swf files in widget?

    Quote Originally Posted by Brandybuck View Post
    Under X11, you could use XEmbed and QX11EmbedContainer to embed the proprietary flash player in a window.
    How to use this!
    Can u give any example or link!
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  10. #10
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Thanks
    7
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Running flash .swf files in widget?

    Qt Code:
    1. QAxWidget *flash("ShockWave Flash Object");
    2. flash->dynamicCall("Movie(const QString&)", filename);
    3. flash->dynamicCall("Play");
    To copy to clipboard, switch view to plain text mode 

  11. #11
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question Re: Running flash .swf files in widget?

    Quote Originally Posted by mchara View Post
    Qt Code:
    1. QAxWidget *flash("ShockWave Flash Object");
    2. flash->dynamicCall("Movie(const QString&)", filename);
    3. flash->dynamicCall("Play");
    To copy to clipboard, switch view to plain text mode 
    QAxWidget only runs on Windows OS. I want to ask problem using with Fedora 6.
    Have u any alternative.
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  12. #12
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question Re: Running flash .swf files in widget?

    Quote Originally Posted by ashukla View Post
    QAxWidget only runs on Windows OS. I want to ask problem using with Fedora 6.
    Have u any alternative.
    Dear Experts!

    Give suggestion for above!
    with reards!
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  13. #13
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Running flash .swf files in widget?

    Quote Originally Posted by ashukla View Post
    How to use this!
    Can u give any example or link!
    Qt Assistant!

    It is very good documentation. Very good. When you want to know how to use a class, it should be the first place you look. It tells you all about QX11Embed classes.

  14. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Running flash .swf files in widget?

    But it doesn't tell you how to get a window id of a particular window from a 3rd party app

  15. #15
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Running flash .swf files in widget?

    Quote Originally Posted by wysota View Post
    But it doesn't tell you how to get a window id of a particular window from a 3rd party app
    Dear Sir!
    Tell some link, suggestions & any alternative to acheive goal!
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  16. #16
    Join Date
    Oct 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Running flash .swf files in widget?

    This is the code which embeds webkit inside a widget. Only problem is plugins not loaded. there are qwebobjectplugin.cpp and qobjectpluginconnector.cpp files in API of webkit. But I don't know how to use these two files and classes inside it to enable plugin.

    Qt Code:
    1. #include <qwebpage.h>
    2. #include <qwebframe.h>
    3. #include <qwebsettings.h>
    4. .
    5. .
    6. .
    7. QWebSettings settings = QWebSettings::global();
    8. settings.setAttribute(QWebSettings::PluginsEnabled);
    9. QWebSettings::setGlobal(settings);
    10. QUrl url("http://www.yahoo.com");
    11. page= new QWebPage(this);
    12. page->open(url);
    13. show();
    To copy to clipboard, switch view to plain text mode 
    Kindly help if there is a way to include plugin. I can provide the code for qwebobjectplugin.cpp and qobjectpluginconnector.cpp .

  17. #17
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Running flash .swf files in widget?

    The problem is not embedding WebKit into the app, but embedding a 3rd party player into WebKit or directly in your app. If you use native X calls to fetch the winId, it shouldn't be a problem. But you have to dig into Xlib to see how to get the id of a particular window which I doubt will be very simple.

  18. #18
    Join Date
    Oct 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Running flash .swf files in widget?

    there is api for inclusion of 3rd party plugin inside QtWebKIt. I am giving content of qwebobjectplugin.cpp . In this you can see that /webplugins folder is included where third party plugins library may be placed. but how to include this and use.

    Qt Code:
    1. #include "qwebobjectplugin_p.h"
    2. #include <qwebobjectpluginconnector.h>
    3. #include <qcoreapplication.h>
    4. #include <qfileinfo.h>
    5.  
    6. #ifndef QT_NO_LIBRARY
    7. Q_GLOBAL_STATIC_WITH_ARGS(QWebFactoryLoader, loader,
    8. (QWebObjectPluginFactoryInterface_iid, QCoreApplication::libraryPaths(), QLatin1String("/webplugins")))
    9. #endif
    10.  
    11.  
    12. QWebFactoryLoader::QWebFactoryLoader(const char *iid, const QStringList &paths, const QString &suffix, Qt::CaseSensitivity)
    13. : QFactoryLoader(iid, paths, suffix)
    14. {
    15. QStringList plugins = keys();
    16. foreach(QString k, plugins) {
    17. QWebObjectPlugin *plugin = qobject_cast<QWebObjectPlugin *>(instance(k));
    18. if (!plugin)
    19. continue;
    20. Info info;
    21. info.name = k;
    22. info.description = plugin->descriptionForKey(k);
    23. QStringList mimetypes = plugin->mimetypesForKey(k);
    24. foreach(QString m, mimetypes) {
    25. MimeInfo mime;
    26. mime.type = m;
    27. mime.extensions = plugin->extensionsForMimetype(m);
    28. info.mimes << mime;
    29. }
    30. m_pluginInfo.append(info);
    31. }
    32. }
    33.  
    34. QWebFactoryLoader *QWebFactoryLoader::self()
    35. {
    36. return loader();
    37. }
    38.  
    39.  
    40. QString QWebFactoryLoader::descriptionForName(const QString &key) const
    41. {
    42. foreach(const Info &info, m_pluginInfo) {
    43. if (info.name == key)
    44. return info.description;
    45. }
    46. return QString();
    47. }
    48.  
    49. QStringList QWebFactoryLoader::mimetypesForName(const QString &key) const
    50. {
    51. foreach(const Info &info, m_pluginInfo) {
    52. if (info.name == key) {
    53. QStringList mimetypes;
    54. foreach (const MimeInfo &m, info.mimes)
    55. mimetypes.append(m.type);
    56. return mimetypes;
    57. }
    58. }
    59. return QStringList();
    60. }
    61.  
    62. QString QWebFactoryLoader::mimeTypeForExtension(const QString &extension)
    63. {
    64. foreach(const Info &info, m_pluginInfo) {
    65. foreach (const MimeInfo &m, info.mimes) {
    66. if (m.extensions.contains(extension))
    67. return m.type;
    68. }
    69. }
    70. return QString();
    71. }
    72.  
    73.  
    74. QStringList QWebFactoryLoader::extensions() const
    75. {
    76. QStringList extensions;
    77. foreach(const Info &info, m_pluginInfo) {
    78. foreach (const MimeInfo &m, info.mimes)
    79. extensions << m.extensions;
    80. }
    81. return QStringList();
    82.  
    83. }
    84.  
    85. QString QWebFactoryLoader::nameForMimetype(const QString &mimeType) const
    86. {
    87. foreach(const Info &info, m_pluginInfo) {
    88. foreach (const MimeInfo &m, info.mimes)
    89. if (m.type == mimeType)
    90. return info.name;
    91. }
    92. return QString();
    93. }
    94.  
    95. QObject *QWebFactoryLoader::create(QWebFrame *frame,
    96. const QUrl &url,
    97. const QString &_mimeType,
    98. const QStringList &argumentNames,
    99. const QStringList &argumentValues)
    100. {
    101. QString mimeType = _mimeType;
    102. if (mimeType.isEmpty()) {
    103. QFileInfo fi(url.path());
    104. mimeType = mimeTypeForExtension(fi.suffix());
    105. }
    106. QString name = nameForMimetype(mimeType);
    107. QWebObjectPlugin *plugin = qobject_cast<QWebObjectPlugin *>(instance(name));
    108. if (!plugin)
    109. return 0;
    110. QWebObjectPluginConnector *connector = new QWebObjectPluginConnector(frame);
    111. return plugin->create(connector, url, mimeType, argumentNames, argumentValues);
    112. }
    113.  
    114.  
    115.  
    116. /*! \class QWebObjectPlugin
    117.  
    118.   This class is a plugin for the HTML object tag. It can be used to embed arbitrary content in a web page.
    119. */
    120.  
    121.  
    122. QWebObjectPlugin::QWebObjectPlugin(QObject *parent)
    123. : QObject(parent)
    124. {
    125. }
    126.  
    127. QWebObjectPlugin::~QWebObjectPlugin()
    128. {
    129. }
    130.  
    131. /*!
    132.   \fn QStringList QWebObjectPlugin::keys() const
    133.  
    134.   The keys should be unique names.
    135. */
    136.  
    137. /*!
    138.   A description for \a key.
    139. */
    140. QString QWebObjectPlugin::descriptionForKey(const QString &key) const
    141. {
    142. return QString();
    143. }
    144.  
    145. /*!
    146.   returns the mimetypes that can be handled by \a key.
    147. */
    148. QStringList QWebObjectPlugin::mimetypesForKey(const QString &key) const
    149. {
    150. return QStringList();
    151. }
    152.  
    153.  
    154. /*!
    155.   \fn QStringList QWebObjectPlugin::extensionsForMimetype() const
    156.  
    157.   Should return a list of extensions that are recognised to match the \a mimeType.
    158. */
    159. QStringList QWebObjectPlugin::extensionsForMimetype(const QString &mimeType) const
    160. {
    161. return QStringList();
    162. }
    To copy to clipboard, switch view to plain text mode 
    PANKAJ SHUKLA

  19. #19
    Join Date
    Oct 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Running flash .swf files in widget?

    How to resize anything for ex: gnash inside QX11EmbedContainer window? gnash is running flash movie inside QX11EmbedContainer but not resizing it of the same size as of QX11EmbedContainer.
    PANKAJ SHUKLA

  20. #20
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Running flash .swf files in widget?

    Dear Experts!
    Kindly give me a contact address of WebKit developers!
    Specially I want the contact/e-mail address of Jack belongs from London.
    b/z he says that it can be possible when I am searching on google! but the link of file is not exists!
    hoping an earlier response!
    with regards!
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.