Project

General

Profile

Bug #3415

Problem with WMediaPlayer and custom jQuery

Added by Alan Finley about 8 years ago. Updated almost 8 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
07/02/2014
Due date:
% Done:

0%

Estimated time:

Description

I've manage to create a simple example which reproduces my old problem with WMediaPlayer.

I'm using Highcharts plots in my app, and to get the Highcharts work propely I load jQuery v1.8.2. When I do this, WMediaPlayer widget doesn't load and I get the following errors in browser console:

Uncaught TypeError: Cannot read property 'fn' of undefined | jquery.jplayer.min.js:1
Uncaught TypeError: Object [object Object] has no method 'jPlayer' | wt:128

Here's an example:

Wt::WApplication* createApplication(const Wt::WEnvironment& env)
{
    Wt::WApplication *app = new Wt::WApplication(env);

    Wt::WMediaPlayer *player = new Wt::WMediaPlayer(Wt::WMediaPlayer::Video);
    app->root()->addWidget(player);

    const std::string jqueryMin = "js/jquery.min.js";
    app->requireJQuery(jqueryMin);

    return app;
}

If I comment out app->requireJQuery, WMediaPlayer loads fine.

I use Wt 3.3.1.

Also available in: Atom PDF