Page 1 of 1

UDP: Differences between WebPlugin and native interface

Posted: 22 Jan 2013 09:58
by chickenkiller
Hi everyone,

I am streaming media as UDP unicast, and I know it is working.

I can display my media locally using

Code: Select all

vlc 'udp://@:1234'
and it works correctly.

I am then, on the same machine (fresh Fedora 18, firewall disabled, Firefox 18), trying to open the stream on a html page using the NPAPI-based WebPlugin provided by my fedora:

Code: Select all

<html>     <head>         <title>Test VLC</title>     </head>     <body>         <object version="VideoLAN.VLCPlugin.2" pluginspage="http://www.videolan.org" type="application/x-vlc-plugin"                 toolbar="true" autoplay="true"                 id="player-vlc" width="1280px" height="720px"                 target="udp://@:1234">         </object>     </body> </html> 
and nothing appears. No messages are available from the webplugin so hard to debug. I was wondering if the MRL syntax is the same for both interfaces, or if I mis-configured something, perhaps on Firefox which could be blocking the port? But it sounds weird...

Thanks for any hints,
Lionel

Re: UDP: Differences between WebPlugin and native interface

Posted: 22 Jan 2013 10:16
by Jean-Baptiste Kempf
run firefox from command line and see the debug messages.

Re: UDP: Differences between WebPlugin and native interface

Posted: 22 Jan 2013 11:43
by chickenkiller
Firefox does not give me any message. I tried with enabling debug flags for gtk and gdk as well, but as expected does not give me anything related to the WebPlugin.

Re: UDP: Differences between WebPlugin and native interface

Posted: 23 Jan 2013 00:46
by Jean-Baptiste Kempf
Are you sure you are using the VLC webplugin? What is the version call telling you?

Re: UDP: Differences between WebPlugin and native interface

Posted: 23 Jan 2013 08:38
by chickenkiller
"Version info: 2.0.5 Twoflower"

The same webpage on a windows box or other (old fedora 10) linux boxes works perfectly.

Re: UDP: Differences between WebPlugin and native interface

Posted: 23 Jan 2013 19:56
by Jean-Baptiste Kempf
The call should not say that. Are you calling the correct JS call to get the function?

http://git.videolan.org/?p=npapi-vlc.gi ... ml;hb=HEAD
version should popup a dialog.

Re: UDP: Differences between WebPlugin and native interface

Posted: 23 Jan 2013 21:20
by Rémi Denis-Courmont
As far as UDP is concerned, there is no difference between the web plugin and the plain VLC, on VLC side. That is not to say that there might not be special security "measures" in the browser or in the operating system.

Re: UDP: Differences between WebPlugin and native interface

Posted: 24 Jan 2013 10:39
by chickenkiller
The call should not say that. Are you calling the correct JS call to get the function?

http://git.videolan.org/?p=npapi-vlc.gi ... ml;hb=HEAD
version should popup a dialog.
The exact string returned by vlc.VersionInfo was "2.0.5 Twoflower". On the test page above, I get "vlc 2.0.5 Twoflower" in the popup.

Re: UDP: Differences between WebPlugin and native interface

Posted: 24 Jan 2013 10:42
by chickenkiller
As far as UDP is concerned, there is no difference between the web plugin and the plain VLC, on VLC side. That is not to say that there might not be special security "measures" in the browser or in the operating system.
Indeed I am suspecting something in the browser, but I don't know where to search and it's really blocking for me...

Re: UDP: Differences between WebPlugin and native interface

Posted: 24 Jan 2013 16:37
by chuck2nd
I'm using RHEL 6.2, and have had trouble getting the NPAPI plugin working with earlier versions of Firefox. I have it working with Firefox 10.0.12. You might also try Chromium if that is an option. I have the plugin working on Chrome 24.0.1312.52. They both are streaming multicast udp.

Re: UDP: Differences between WebPlugin and native interface

Posted: 25 Jan 2013 15:25
by chickenkiller
I eventually found the problem: the culprit was, as I suspected, SELinux. Looking through /var/log/messages, I saw this message:

Code: Select all

setroubleshoot: SELinux is preventing /usr/lib/xulrunner/plugin-container from name_bind access on the udp_socket . For complete SELinux messages. run sealert -l 66ce8cd1-1406-496b-8aa7-a420ac4b0e64
Following the SELinux instructions, I issued the following commands (as root):

Code: Select all

grep plugin-container /var/log/audit/audit.log | audit2allow -M mypol semodule -i mypol.pp
and then, everything worked correctly again.

I hate SELinux on dev machines. Thanks everyone for your interest about the subject.

Cheers
Lionel