Some files can be read through file:// but not http://

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
sylvainpv
New Cone
New Cone
Posts: 2
Joined: 09 Feb 2015 10:32

Some files can be read through file:// but not http://

Postby sylvainpv » 09 Feb 2015 11:04

Hi everyone,

I got a strange issue with the VLC web plugin, both ActiveX and NPAPI versions. I have a set of several video and audio files with different codecs and container formats. All these files can be read with VLC application on Windows. When testing the VLC web plugin with basic setup and configuration, I noticed some of these files can not be read through the browser and a local HTTP server. If I test the same web page directly from my file system, with the file:// protocol, all the files can be played. It is only when I passed through a HTTP server that some of these files do not play.

I don't see any correlation between the affected files. Here are my results:

Image

Note that all the MP3 and FLAC files are affected. For video files, one .MOV(AVC+AAC) is affected while two others with the exact same codecs are not.

I tested this with different local servers (Apache, Node.js and nginx) and with proper MIME types configuration, no GZIP and checked the Range headers. The results are the same.

Does anyone has an idea ?
Thanks in advance

sylvainpv
New Cone
New Cone
Posts: 2
Joined: 09 Feb 2015 10:32

Re: Some files can be read through file:// but not http://

Postby sylvainpv » 09 Feb 2015 14:48

Okay I just figured it out. All the affected files have a whitespace in their URL. If I add an encodeURI() around the URL it works. For some reason, the problem does not appear with HTML5 <video> tag and VLC plugin on file:// protocol.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Some files can be read through file:// but not http://

Postby Jean-Baptiste Kempf » 12 Feb 2015 11:20

Yes, VLC plays URI.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 19 guests