Results 1 to 13 of 13

Thread: phonon mediaplayer as browser plugin ?

  1. #1
    Join Date
    Jan 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default phonon mediaplayer as browser plugin ?

    Finally, i succeeded in building the demos/examples supplied with Qt 4 and phonon.

    Well, now i tried to embed the 'mediaplayer' (demos/mediaplayer) demonstration
    into the 'browser plugin' project example 'trivial' that can be found here.

    I did this by simply merging those two pieces of code together and calling an instanciation of the media player object in the constructor of the 'trivial' plug in.

    Well, so far so good.

    When the 'trivial' plug in example is run now, it also shoots the media player window.
    All dialogs work, but if i try to open some media file, nothing happens.

    ( I double checked if the file is really opened, but it seems like the actual playback is never triggered. I use the very unchanged source of the media player example. )

    Why ?

    ( Also, it is mentioned in the doc about browser plugin development [ see here] that 'since any QWidget or QObject subclass can be turned into a plugin with little effort it is usually easiest to do the development as a stand-alone Qt application'. Can someone point me to some more information regarding this process ? Because this seems to be exactly what i'm trying to do ... )

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: phonon mediaplayer as browser plugin ?

    how are u providing it the file to be played? from the system?

  3. #3
    Join Date
    Jan 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: phonon mediaplayer as browser plugin ?

    Using the file open dialog which is included in the media player.

  4. #4
    Join Date
    Jan 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: phonon mediaplayer as browser plugin ?

    Still hoping for a useful answer here.

  5. #5
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: phonon mediaplayer as browser plugin ?

    i m not sure but if u wanna play a music file on a browser..u might wanna add the file using URL..not a file from the computer..

  6. #6
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: phonon mediaplayer as browser plugin ?

    Are you using opensource or commercial edition ?

    I see that in trivial hello world example, ActiveQt is included, which is available only for commericial editions.

    Might be that it is causing the problem

  7. #7
    Join Date
    Jan 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: phonon mediaplayer as browser plugin ?

    Hmmm ... nay, nay and nay.

    Neither it is the media file opened as URL instead of file ( already tried that ) nor the possible usage of ActiveQt (the trivial example itself runs like a charm and the mediaplayer also shows up and is 'usable' so far)

    No, it has to be something different here.

    When i try to open any file also the media player window shows the name of the file as window title ... seems like it tries to open the media at least ...

  8. #8
    Join Date
    Jan 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: phonon mediaplayer as browser plugin ?

    Update:

    After playing a bit with phonon in an ordinary application environment, i changed my plugin source so i can see the state of the mediaObject used within.

    Seems like the mediaObject never ever overcomes the Loading state, so it'll never start actual playback ... but why's that ?

    I'm getting somewhat hopeless here

  9. #9
    Join Date
    Jan 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: phonon mediaplayer as browser plugin ?

    another update:

    some weirdness i discovered - when i set the file name of the media file to somewhat non-existant, it still reports NO error but keeps being stuck in the loading state instead

    ...

  10. #10
    Join Date
    Jan 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: phonon mediaplayer as browser plugin ?

    still no useful solution here ...

  11. #11
    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: phonon mediaplayer as browser plugin ?

    I don't know anything about writing Netscape API plugins (which is what you are trying to do). But I have used mediaplayer as a plugin for QtWebKit. See http://www.qtcentre.org/forum/f-qt-webkit-36.html for more info.

  12. #12
    Join Date
    Jan 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: phonon mediaplayer as browser plugin ?

    First of all, thank you for your reply, Brandybuck.

    QtWebKit is one of the things i came across when i was looking for ressources for my issue.
    But it wouldn't solve my problem here, as within a webkit environment, phonon is again
    treated like it is treated within a stand-alone application. ( in which it runs flawless, like described above )

    Again, looking at the behaviour of the phonon module within the plugin running in a browser
    session, i suppose the phonon backend never gets initialized.

    This is evidenced by having the phonon module sitting in the Phonon::LoadingState forever,
    which is already considered being a bug, because it should switch to the ErrorState then.

    Also it is somewhat strange to have phonon also not having toggle to ErrorState when
    supplying it with a non-existant filename, like i did and also described in the posts above.

    As a third proof, i tried to have phonon within the browser plugin have output the
    Phonon::BackendCapabilities, which are NULL (when run within browser, same code again
    runs without any flaws when run stand alone in simple windowed application )

    So any further investigation should focus on the backend initialization, respectively why it's not loaded correcty.
    Last edited by MartinS; 28th February 2009 at 14:29.

  13. #13
    Join Date
    Sep 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: phonon mediaplayer as browser plugin ?

    Hi, I'm interested on your problem because I'm involved in a similar project. Have you solved it?
    It would be useful work on this topic for the community. Thank you

Similar Threads

  1. I cannot run the phonon demos in the PXA270!Can someone help me?
    By Justin_W in forum Qt for Embedded and Mobile
    Replies: 8
    Last Post: 19th February 2010, 10:14
  2. 3D Qt Browser Plugin
    By synack in forum Newbie
    Replies: 6
    Last Post: 10th March 2009, 11:29
  3. Phonon in standalone app via py2app - backend plugin error
    By tory108 in forum Installation and Deployment
    Replies: 6
    Last Post: 20th February 2009, 18:36
  4. QPluginLoader not recognizing a plugin
    By KShots in forum Qt Programming
    Replies: 3
    Last Post: 29th June 2007, 14:13

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.