Hi,
I got myself a cheap Android tablet with the main purpose of watching
videos in bed or the sofa, instead of sitting at the computer. And
instead of saving the video to the flash card of the tablet, I serve it
from a machine running apache. It works nicely.
In /etc/apache2/httpd.conf.local I wrote (or rather, YaST wrote, and I
modified a bit):
Alias /data/store /data/store
<Directory /data/store/>
Options FollowSymLinks Indexes Includes
AllowOverride All
IndexOptions FancyIndexing \
ScanHTMLTitles \
NameWidth=*
order deny,allow
deny from all
allow from localhost .valinor 192.168.1.51 192.168.1.52 192.168.1.32
</Directory>
And I allow wwwrun access to the directory by using ACLs, instead of
giving the tree universal read rights, or changing the owner or group:
CAMINO=/data/store
find $CAMINO -type d -exec setfacl -m u:wwwrun:rx '{}' \;
find $CAMINO -type f -exec setfacl -m u:wwwrun:r '{}' \;
It is like a way of adding “owners” or “groups”.
I also created a terribly simple web page. On
“/srv/www/htdocs/index.html” I have:
<html><body>
<h1>Welcome to AmonLanc</a></h1>
<h2>
<a href="/data/store/">[Data]</a> <br>
</h2>
</body></html>
The pages served are like this (auto generated by Apache, and trimmed a
bit for clarity):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Index of /data/store/Sueltos</title>
</head>
<body>
<h1>Index of /data/store/Sueltos</h1>
<pre>
<img src="/icons/blank.gif" alt="Icon ">
<a href="?C=N;O=D">Name</a>
<a href="?C=M;O=A">Last modified</a>
<a href="?C=S;O=A">Size</a>
<a href="?C=D;O=A">Description</a>
<hr><img src="/icons/back.gif" alt="[PARENTDIR]">
<a href="/data/store/">
Parent
Directory</a>
-
<img src="/icons/movie.gif" alt="[VID]">
<a href="Salvados%2011x05.(laSexta).avi">
Salvados 11x05 Españoles por Suiza.avi</a>
2013-11-26 05:46 1.0G<hr>
</pre>
<address>Apache/2.4.6 (Linux/SUSE) Server at amonlanc.valinor Port
80</address>
</body></html>
It does work, with caveats.
In the tablet, when tapping on a video with Firefox, it asks me how to
complete the action; it offers a number of apps, and one of them is VLC.
VLC is started standalone, given the URL, and renders the video on the
fly without saving it locally (which is perfect, as some of the videos
are too big for FAT).
However, in Linux, I think it worked yesterday (I’m unsure), but not
today after a reboot of the client machine. Maybe it did not.
Firefox wants to display the video internally, with several plugins.
First xine, which fails. I disable it. Then it wants windows media
player. I disable it. Then mplayer something. I also disable it. Then,
when about the only plugin active is “vlc web plugin”, it works… but
inside Firefox… I would like it outside, stand alone vlc.
If on the plugin page I say “act to activate”, it asks to activate the
plugin it chooses. I can’t choose plugin, or none at all, standalone app.
If I disable VLC plugin, instead FF asks me to save or open with
application. If I tell it to open with vlc, it first downloads the full
video, then starts VLC with it. I do not want that at all.
What should be done so that Firefox starts vlc as a standalone app, same
as in Android, giving VLC the URL as a parameter, automatically?
I can copy the URL to the clipboard, start VLC, then paste the URL. That
does work. But it is a nuisance, not automatic.
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)