|
|
Krister's Blog
krister at hallergard dot com
| Last Updated:
2021-03-30 Newer version
|
HTTP Server for Streaming to Android TV
Using Browsers - HTML Menus
About a year ago Google started to block access to local html content for Android browsers. For me this was
very inconvenient as I use html menus to stream family videos from my PC
and from YouTube to our Android TV. But after installing a local host - http server - it is still possible.
View Video 7 min
Windows
To setup a local host as http server on Windows, some IIS (Internet Information Services) features have to be enabled (see picture to the right!). This installs a local
website to C:\inetpub\wwwroot with the IP-address for this site http://192.168.0.2:80, where 2 is the PC's Ethernet IP-address and 80 the default port.
Addendum 2021-06-13: Decided to add an authorisation rule for port 8000, so that the shortcuts on Android devices would work
also with Linux Servers.
You can replace its content with your own website. I moved my site from C:\Plex
to C:\inetpub\wwwroot - this was very easy, as all paths in my menus are relative rather than absolute.
|
IIS Internet Information Services
|
Linux
In Linux all you need for a local host is to install Python3, and in a terminal navigate to the root of your
local website, and then execute the command "python3 -m http.server 8000" The IP-address for this site is
http://192.168.0.6:8000, where 6 is the PC's WiFi IP-address and 8000 the default port. Applied this in a
simple script to autostart at boot time.
Addendum 2021-06-13: Decided to change authorisation to port 80 in the script, so that the shortcuts on the Android devices would work
also with Windows Servers.
Android
There is an app SimpleHttpServer,
which allows accessing local html content. The IP-address for this site is http://192.168.0.8:12345, where 8 is the TV's IP-address
and 12345 the default port.
My Android TV does not have much storage space left for videos, so I only copied over the menus, not the videos. These html
menus instead link to the same videos that I have uploaded to YouTube, e.g. https://youtu.be/BiJRzGeHCaM -
Our uploaded family videos on YouTube are all unlisted, so that only those I have given the links to can open them.
I also use this local host and menus also for my other Android devices.
|
Android Local Host
|
|