Project

General

Profile

Support #1319

WMediaPlayer resources error in 3.2.1

Added by Somsubhra Sharangi about 10 years ago. Updated about 10 years ago.

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

0%

Estimated time:

Description

Hi,

I wrote a simple Media player following the examples but it fails giving a error dialog box "Fatal error: failed loading /resources/jPlayer/jquery.jplayer.min.js".

#include <Wt/WApplication>
#include <Wt/WEnvironment>
#include <Wt/WMediaPlayer>
#include <Wt/WLink>

using namespace Wt;
using namespace std;

namespace {
  std::string ogvVideo = "http://www.webtoolkit.eu/videos/sintel_trailer.ogv";
  std::string mp4Video = "http://www.webtoolkit.eu/videos/sintel_trailer.mp4";
  std::string poster   = "pics/sintel_trailer.jpg";
}

class MediaApplication : public WApplication {
    public:
        MediaApplication(const WEnvironment& env) : WApplication(env) {

          WMediaPlayer *player = new WMediaPlayer(WMediaPlayer::Video, root());

          player->addSource(WMediaPlayer::M4V, WLink(mp4Video));
          player->addSource(WMediaPlayer::OGV, WLink(ogvVideo));
          player->addSource(WMediaPlayer::PosterImage, WLink(poster));

    }
};

WApplication *createApplication(const WEnvironment& env) {
    return new MediaApplication(env);
}

int main( int argc, char** argv){
    return Wt::WRun(argc, argv, &createApplication);
}

som@lub00:~/avcr$ ./bin/WebAvStatic --docroot . --http-address 0.0.0.0 --http-port 9090
[2012-Jun-07 00:32:53.407774] 19922 - [info] "config: reading Wt config file: /etc/wt/wt_config.xml (location = './bin/WebAvStatic')"
[2012-Jun-07 00:32:53.408738] 19922 - [info] "WServer/wthttp: initializing built-in wthttpd"
[2012-Jun-07 00:32:53.409033] 19922 - [info] "wthttp: started server: http://0.0.0.0:9090"
[2012-Jun-07 00:33:20.006769] 19922 - [info] "Wt: session created (#sessions = 1)"
[2012-Jun-07 00:33:20.006923] 19922 [/ khhkx713VsEAorSm] [info] "WEnvironment: UserAgent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19"
127.0.0.1 - - [2012-Jun-07 00:33:20.007495] "GET / HTTP/1.1" 200 1841
[2012-Jun-07 00:33:20.007528] 19922 - [info] "WebRequest: took 0.822ms"
127.0.0.1 - - [2012-Jun-07 00:33:20.069341] "GET /?wtd=khhkx713VsEAorSm&request=style HTTP/1.1" 200 119
[2012-Jun-07 00:33:20.069448] 19922 - [info] "WebRequest: took 11.543ms"
127.0.0.1 - - [2012-Jun-07 00:33:20.094274] "GET /resources//themes/default/wt.css HTTP/1.1" 404 85
127.0.0.1 - - [2012-Jun-07 00:33:20.095466] "GET /resources/webkit-transitions.css HTTP/1.1" 404 85
127.0.0.1 - - [2012-Jun-07 00:33:20.095517] "GET /resources/jPlayer/skin/jplayer.blue.monday.css HTTP/1.1" 404 85
127.0.0.1 - - [2012-Jun-07 00:33:20.097823] "GET /?wtd=khhkx713VsEAorSm&sid=120453749&htmlHistory=true&deployPath=%2F&request=script&rand=4037687418 HTTP/1.1" 200 49801
[2012-Jun-07 00:33:20.100473] 19922 - [info] "WebRequest: took 32.972ms"
127.0.0.1 - - [2012-Jun-07 00:33:20.191212] "GET /resources/jPlayer/jquery.jplayer.min.js HTTP/1.1" 404 85
127.0.0.1 - - [2012-Jun-07 00:33:20.210738] "GET /favicon.ico HTTP/1.1" 404 85

I saw a similar incident #1007 reported, but my case seems a little different. I have checked the resources folder and the files are there.

Please help.

#1

Updated by Wim Dumon about 10 years ago

In the log file, those '404' codes mean that a file has not been found. Apparently, none of the files in the resources folder are found (4 files are requested in the resources folder, none of them was found). Check that the resources folder is really copied/linked in the directory that you indicate with ---docroot, and verify that they have proper access permissions (reading should be allowed).

#2

Updated by Koen Deforche about 10 years ago

  • Status changed from New to Feedback

Also available in: Atom PDF