pouët.net

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.
added on the 2015-07-05 15:51:43 by ClySuva ClySuva
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.
added on the 2015-07-05 16:46:41 by ClySuva ClySuva
"python -m SimpleHTTPServer" not good enough?
added on the 2015-07-05 18:02:51 by psenough psenough
Quote:
"python -m SimpleHTTPServer" not good enough?


That expects python to be installed in the machine.
added on the 2015-07-05 18:06:34 by ClySuva ClySuva
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.
added on the 2015-07-05 18:12:54 by ClySuva ClySuva
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.
added on the 2015-07-05 20:57:44 by psenough psenough
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?
added on the 2015-07-05 21:17:55 by Tomoya Tomoya
^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)
added on the 2015-07-05 21:44:18 by T$ T$
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.
added on the 2015-07-05 21:45:28 by Tomoya Tomoya
github gh-pages?
added on the 2015-07-05 21:52:45 by psenough psenough
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.
BB Image
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=.
added on the 2015-07-05 22:00:28 by gasman gasman
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.
added on the 2015-07-05 22:11:19 by psenough psenough
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.
added on the 2015-07-05 22:15:15 by psenough psenough
a youtube video will suffice!
added on the 2015-07-05 22:22:13 by maali maali
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.
added on the 2015-07-05 22:48:50 by maali maali
Some have also written a wrapper, so that the webgl-demo can be saved into onefile. That will open without fuzz
added on the 2015-07-05 22:50:41 by T-101 T-101
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.
added on the 2015-07-05 23:02:24 by ClySuva ClySuva

login