Web demo launcher
category: code [glöplog]
Hey, I wrote a little piece of code, to assist launching web demos without the need of using browser command line arguments. What it does is start up a super minimal web server, and launch a browser. There are also tools to shut down the server from inside the browser.
To use it, place the executable in the same folder as demo index.html is, no other configuration necessary.
https://github.com/Suva/WebDemoLauncher/releases
https://github.com/Suva/WebDemoLauncher/
Currently it launches the default browser. Ideally it should launch the desired browser (such as chrome) and if possible, run it in full screen.
Any feedback welcome.
To use it, place the executable in the same folder as demo index.html is, no other configuration necessary.
https://github.com/Suva/WebDemoLauncher/releases
https://github.com/Suva/WebDemoLauncher/
Currently it launches the default browser. Ideally it should launch the desired browser (such as chrome) and if possible, run it in full screen.
Any feedback welcome.
To make sure the server closes down after demo has been watched, include magic script <script src="/wdl.js"></script> in your demo, this will register unload handler that will signal server to be closed down when window is closed or page left.
"python -m SimpleHTTPServer" not good enough?
Quote:
"python -m SimpleHTTPServer" not good enough?
That expects python to be installed in the machine.
The purpose of this tool is to be packaged together with a browser demo, so people who are not well accustomed with the intricacies of running browser demos could launch them like normal PC demos.
i understand the problem you're trying to address, i'm just not convinced it's worth addressing with this kind of solution. but i guess it's better the solution exists then it not existing. atleast people have that option now, let's see if they use it. kudos for sharing.
personally i would rather point people to the online address where they can see the real thing working then include this in the package, but that's me.
personally i would rather point people to the online address where they can see the real thing working then include this in the package, but that's me.
Quote:
personally i would rather point people to the online address where they can see the real thing working then include this in the package, but that's me.
I can totally seeing demos being hosted for ~3 years after the release, what after that period, though?
^this. More often than not it's even less than 3 years.
what about hosting web demos @ scene.org?
(online launchable, aditionally to the download package)
(online launchable, aditionally to the download package)
I'm wondering if it's possible to provide a secured space for that, so that those demos can't do any funny stuff to the hosting.
github gh-pages?
1) people would need to set up an account.
2) you trust github to offer a free service for the forseeable future.
scene.org sounds good. should be safe as long as only static content will be served and other scene.org services don't spam their cookies to all possible scene.org subdomains.
2) you trust github to offer a free service for the forseeable future.
scene.org sounds good. should be safe as long as only static content will be served and other scene.org services don't spam their cookies to all possible scene.org subdomains.
Anything that reduces the friction for people who just want to download / unzip / click on an icon, has got to be a good thing. Just as long as it doesn't become a substitute for writing proper launch instructions in the readme - there are other platforms besides Windows, after all :-)
(and yeah, running an online version is even lower friction, but there are various cultural reasons why the scene isn't going to whole-heartedly adopt that any time soon.)
Quote:
"python -m SimpleHTTPServer" not good enough?
Actually, no... SimpleHTTPServer doesn't handle Content-Range headers, which are (were?) required by Webkit to seek media elements correctly. So I use this instead:
Code:
twistd -no web -p8020 --path=.
My js/html runs straight off the desktop in Chrome and Firefox.
saga musix: oh noes! a coder having to setup an account to use a service online, the horror! i somehow think they can handle it, most of everyone who develops web demos nowdays already has a github account. the trust in github is a valid concearn but i believe when they would fail on this, other alternatives would be around, plus the whole browser standard would have changed already and we would be talking preserving legacy here, not availablity.
which reminds me: how do you play back all those early web demos made in flash and java under modern browsers btw? let me tell you it's a bitch to setup. i would see much more need of a tool/emulator/whatever to run these rather then the modern browser demos.
gasman: who needs to skip track playback anyways?! ;P right you are.
which reminds me: how do you play back all those early web demos made in flash and java under modern browsers btw? let me tell you it's a bitch to setup. i would see much more need of a tool/emulator/whatever to run these rather then the modern browser demos.
gasman: who needs to skip track playback anyways?! ;P right you are.
rasmus: there are limitations on what you can access when you run it off the desktop. probably 80% of the web demos released won't work running off the desktop. and it's not just a matter of being careful when coding afaicr.
a youtube video will suffice!
yeah, booting chrome with some flags is just as much as a hassle as copying your mini http server file into the demo dir and booting that, so this 'tool' is not exactly winning on convenience. i find hosting online + releasing a .zip more than enough, i can just be bothered to click on the online link and when that hosting dies, there's the zip for archiving sake. it's not like you can watch old dos demos with one click either.
Some have also written a wrapper, so that the webgl-demo can be saved into onefile. That will open without fuzz
Quote:
yeah, booting chrome with some flags is just as much as a hassle as copying your mini http server file into the demo dir and booting that
The tool is intended to be included with release. I wrote it mainly for myself, and my future releases. I released it for public so others could do the same if they think it is a good idea.
Problem with this option is that often people add this option to Chrome icon on desktop, which works just fine if you start chrome first via this icon and then open the demo. But if chrome is closed, and you open the demo by clicking on the index.html, it won't work. This has even happened on big screen on demo parties. So this is one of the reasons for writing this demo.