Project

General

Profile

Actions

Bug #1007

closed

WMediaPlayer - WLink

Added by Anonymous over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
09/28/2011
Due date:
% Done:

0%

Estimated time:

Description

Dear Koen,

I could not set a local file as a source for WMediaPlayer:

WMediaPlayer::Encoding enc = WMediaPlayer::M4V;

WFileResource *file = new WFileResource( "/path/to/local/file" );

WLink link;

link.setResource( file );

mediaplayer->addSource( enc, link );

The media player can be seen on the browser, but does not play anything. The log says:

127.0.0.1 - - [2011-Sep-28 09:59:43.182668] "GET /resources/jPlayer/?wtd=2mJX7xRnfz7koyqR&request=resource&resource=o7ouuod&rand=0 HTTP/1.1" 404 85

when I try to get the file via this link:

http://localhost:8080/?wtd=2mJX7xRnfz7koyqR&request=resource&resource=o7ouuod&rand=0

I got it:

127.0.0.1 - - [2011-Sep-28 10:01:56.532608] "GET /?wtd=2mJX7xRnfz7koyqR&request=resource&resource=o7ouuod&rand=0 HTTP/1.1" 200 29966022

That is "/resources/jPlayer/" path is superfluous.

I got the same error using InternalPath for WLink.

Thanks for fixing this error.

Gabor


Files

test.C (1013 Bytes) test.C Gabor Tusnady, 10/04/2011 10:20 AM
Actions #1

Updated by Koen Deforche over 12 years ago

Hey,

What browser are you using to have this behavior? Somehow I can see what goes wrong but fail to reproduce it.

Can you also provide a complete request log for a session?

Regards,

koen

Actions #2

Updated by Gabor Tusnady over 12 years ago

Dear Koen,

I am using firefox 5.0, and google chrome. Here is the full log:

@[2011-Oct-04 10:08:08.776804] 13253 - [notice] "Wt: initializing built-in httpd"

[2011-Oct-04 10:08:08.776904] 13253 - [notice] "Reading Wt config file: /etc/wt/wt_config.xml (location = './bin/DEBUG/test')"

[2011-Oct-04 10:08:08.777702] 13253 - [notice] "Started server: http://0.0.0.0:8080"

Firefox:

[2011-Oct-04 10:09:07.031220] 13253 [/ pex0lzqFBK4FUQkT] [notice] "Session created (#sessions = 1)"

[2011-Oct-04 10:09:07.031462] 13253 [/ pex0lzqFBK4FUQkT] [notice] "UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0"

127.0.0.1 - - [2011-Oct-04 10:09:07.032744] "GET / HTTP/1.1" 200 1712

[2011-Oct-04 10:09:07.036468] 13253 [/ fB7I8fjMy5kxFjxx] [notice] "Session created (#sessions = 2)"

[2011-Oct-04 10:09:07.036584] 13253 [/ fB7I8fjMy5kxFjxx] [notice] "UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0"

[2011-Oct-04 10:09:07.036866] 13253 [/ fB7I8fjMy5kxFjxx] [notice] "Signal from dead session, sending reload."

[2011-Oct-04 10:09:07.037058] 13253 [/ fB7I8fjMy5kxFjxx] [notice] "Session destroyed (#sessions = 1)"

127.0.0.1 - - [2011-Oct-04 10:09:07.037196] "POST /?wtd=nL51FQzVaEYrPtzE HTTP/1.1" 200 72

127.0.0.1 - - [2011-Oct-04 10:09:07.057003] "GET /?wtd=pex0lzqFBK4FUQkT&request=style HTTP/1.1" 200 117

127.0.0.1 - - [2011-Oct-04 10:09:07.066601] "GET /resources//themes/default/wt.css HTTP/1.1" 304 0

127.0.0.1 - - [2011-Oct-04 10:09:07.066879] "GET /?wtd=pex0lzqFBK4FUQkT&sid=977674870&htmlHistory=true&request=script&rand=813038301 HTTP/1.1" 200 34436

127.0.0.1 - - [2011-Oct-04 10:09:07.068023] "GET /resources/moz-transitions.css HTTP/1.1" 304 0

127.0.0.1 - - [2011-Oct-04 10:09:07.068311] "GET /resources/jPlayer/skin/jplayer.blue.monday.css HTTP/1.1" 304 0

127.0.0.1 - - [2011-Oct-04 10:09:07.100670] "GET /resources/jPlayer/jquery.jplayer.min.js HTTP/1.1" 304 0

127.0.0.1 - - [2011-Oct-04 10:09:07.314746] "GET /resources/jPlayer/skin/jplayer.blue.monday.jpg HTTP/1.1" 304 0

127.0.0.1 - - [2011-Oct-04 10:09:07.316939] "POST /?wtd=pex0lzqFBK4FUQkT HTTP/1.1" 200 49

Click to first (WFileResource)

127.0.0.1 - - [2011-Oct-04 10:09:41.670115] "GET /resources/jPlayer/?wtd=pex0lzqFBK4FUQkT&request=resource&resource=omlkr8f&rand=0 HTTP/1.1" 404 85

Click to second (Url)

(no log, just playing the video)

Chrome:

[2011-Oct-04 10:10:40.189739] 13253 [/ AeHvHtVp7cqf3PwQ] [notice] "Session created (#sessions = 2)"

[2011-Oct-04 10:10:40.189892] 13253 [/ AeHvHtVp7cqf3PwQ] [notice] "UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Ubuntu/10.04 Chromium/13.0.782.107 Chrome/13.0.782.107 Safari/535.1"

127.0.0.1 - - [2011-Oct-04 10:10:40.190678] "GET / HTTP/1.1" 200 1710

127.0.0.1 - - [2011-Oct-04 10:10:40.217054] "GET /?wtd=AeHvHtVp7cqf3PwQ&request=style HTTP/1.1" 200 119

127.0.0.1 - - [2011-Oct-04 10:10:40.227939] "GET /?wtd=AeHvHtVp7cqf3PwQ&sid=1267554331&htmlHistory=true&request=script&rand=800228378 HTTP/1.1" 200 34414

127.0.0.1 - - [2011-Oct-04 10:10:40.268704] "GET /favicon.ico HTTP/1.1" 404 85

127.0.0.1 - - [2011-Oct-04 10:10:40.365583] "POST /?wtd=AeHvHtVp7cqf3PwQ HTTP/1.1" 200 50

Click to first

(no log, no playing)

Click to second

(no log, and not playing anything)

@

I have got the same results with Firefox/3.6.17.

I have attached the C source as well.

Thanks your help,

Gabor

Actions #3

Updated by Koen Deforche over 12 years ago

  • Status changed from New to Resolved
  • Target version set to 3.2.0

Hey Gabor,

I could reproduce it now, thanks. A few notes on your sample code though: most audio/video players are really picky on mime types, so make sure you call setMimeType() on the resource with the correct mime type.

Also, you have a mismatch between asking Audio but passing a video ?

A fix is in git head.

Regards,

koen

Actions #4

Updated by Koen Deforche over 12 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF