QWebView / QGraphicsWebView + Javascript HTML 5 music player



  • Dear trolls,

    I'm currently embedding the jPlayer "JQuery audio player" inside of my QGraphicsWebView (I also tried on the Demo QWebView Browser).

    You can access the demo page here:
    "http://www.happyworm.com/jquery/jplayer/latest/demo-02.htm":http://www.happyworm.com/jquery/jplayer/latest/demo-02.htm

    This playlist is half working using the 4.7 webkit on windows vista:

    • Playing a title works fine.
    • Advancing the playback to a given time does not work.
    • When a title is over the player does not go to the next.

    I know this is some random JQuery library but maybe you guys have an idea on what's happening here.

    Besides, all these features are working fine in Chrome / Safari.

    Is there something specific in the equation that might be unsupported by the current Qt 4.7 build ? Is it work in progress ?

    Thank you.

    Benjamin Arnaud.



  • [quote author="bunjee" date="1287266014"]Dear trolls,
    Is there something specific in the equation that might be unsupported by the current Qt 4.7 build ? Is it work in progress ?
    [/quote]

    Yep, this is using HTML 5 audio element, which is not yet fully supported by QtWebKit. The current implementation uses Phonon, and is experimental. Some features of the media elements simply cannot be implemented via Phonon.

    There is research work being done to have HTML 5 media elements implemented with QtMultimediaKit of QtMobility. A first support is planned for QtWebKit 2.2.



  • Thanks / Merci Benjamin,

    Do you think I can expect to have support for this in the next Qt release (4.8) ? Or is it "highly experimental" ?



  • [quote author="bunjee" date="1287332685"]
    Do you think I can expect to have support for this in the next Qt release (4.8) ? Or is it "highly experimental" ?[/quote]

    The scope of Qt 4.8 is not yet defined so it is hard to say what will be and won't be in there. :)

    If you feel adventurous, you can already try installing QtMobility and compiling QtWebKit trunk with it. Some basic support is already there. This is not as seamless as we would like, there are plenty of bugs in QtMultimedia that needs to be fixed.



  • Thanks Benjamin,

    I've tested my jQuery player a little bit and found a way to disable HTML 5 audio and use flash instead.

    A demo of this behavior can be found here:
    "http://www.happyworm.com/jquery/jplayer/latest/demo-02-nativeSupportFalse.htm":http://www.happyworm.com/jquery/jplayer/latest/demo-02-nativeSupportFalse.htm .

    • This happens to work just fine in a traditionnal QWebView + PluginsEnabled.

    • But it's not working in a QGraphicsScene + QGraphicsWebView + PluginsEnabled.

    In this precise case the javascript is just running a simple swf file instead of HTML 5 routines. Are there some Flash restrictions in the QGraphicsWebView ?

    Thanks.



  • [quote author="bunjee" date="1287340088"]Thanks Benjamin,
    In this precise case the javascript is just running a simple swf file instead of HTML 5 routines. Are there some Flash restrictions in the QGraphicsWebView ?
    [/quote]

    When flash is in QGraphicsWebView, it is in windowless mode, so it is a bit different on the flash side (see "http://blog.forwardbias.in/2009/12/flash-in-qgraphicsview.html":http://blog.forwardbias.in/2009/12/flash-in-qgraphicsview.html for more info).
    But that should not affect the plugin other than the rendering. Is it a recent version of the Flash plugin?



  • According to the "Dev Guide":http://www.happyworm.com/jquery/jplayer/latest/developer-guide.htm :

    bq. Jplayer.swf
    The plugin's Flash 8 file, compiled using the Open Source ActionScript 2 Compiler MTASC.
    This file is used in browsers that do not support HTML5 <audio>.

    It's Flash 8.

    bq. But that should not affect the plugin other than the rendering

    I agree, not sure why windowless would affect audio playback.



  • Alright tested out this morning on Mac OS X.

    • Using Cocoa: flash does not run at all. As expected after reading your blog post.

    • Using Carbon: it works fine in both QWebView / QGraphicsWebView. So it appears to be something specific to Windows (Vista ?).

    • Using Carbon on HTML 5: I get the exact same issues than on Windows PC, so I guess Phonon behave consistently :).

    Anyone can try running a simple QGraphicsWebView + "this url":http://www.happyworm.com/jquery/jplayer/latest/demo-02-nativeSupportFalse.htm on a Windows platform to double check it does not work ?

    Thanks.

    B.A.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.