Actions
Bug #3415
openProblem with WMediaPlayer and custom jQuery
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.
Updated by Koen Deforche almost 10 years ago
- Status changed from New to Feedback
Hey,
As a workaround you can call requireJQuery() as the first call, at least that seems to resolve the issue here.
Regards,
koen
Actions