War of the Worlds Broadcast

Website Repo

War of the Worlds Broadcast is a demonstration Progressive Web App featuring Orson Wells’ classic radio drama. CSS Animations play in sync with the audio. PWA features include offline playback and home screen installation. Relive the night of October 30th 1938, when martians were real!

animation CSS JavaScript PWA

Related Articles & Updates

Final QA

Did a final round of #QA for War of the Worlds Broadcast. Lots of minor fixes and tweaks. Adjustments to the layout for really narrow phones in portrait orientation. Almost forgot to install ssl on the site :).

Progress Bar

To keep things interesting over a slow connection, I added a progress bar that kicks in once the audio becomes playable but the image assets aren’t fully loaded. The syringe is an inline svg.

Audio Vizualizer

The pulsing radio light is a feature I always wanted in War of the Worlds Broadcast but never had a way to pull it off. That is until I found this article, which explains that you can pipe the output from an #html5 #audio element into the #WebAudioAPI. That allowed me to measure the decibel […]

Intro With Style

Added a glowing silhouette of the radio as an inline svg. It adds a graphic touch to the app before any actual image files load. The menu is fully interactive at this stage as well. For mobile devices that don’t auto-play, the radio becomes a button to “tune in” and trigger the stream.

Look ‘n’ Feel

The final menu style using the vintage button look. I was going to try some analog format for the clock but this works well so i kept it. The explanatory copy now expands/collapses instead of scrolling.

Vintage Buttons

I wanted to create a real mid-twentieth century look for the interface, without resorting to images. The button style is inspired by typewriter keys and glowing elevator buttons. The gold ring is a series of box-shadows. The glowing effect is a combination of background color clipped to transparent text and a text-shadow overlay. [codepen_embed height=”350″ […]

Bundle Size

Fontawesome (I’m a pro user!) is getting too big for its own good. Even with just the media controls the bundle size was almost 2M. With the social network icons I was pushing upwards of 4M. I switched to the material icon font which brought the bundle down to 200k. It includes everything I need […]

Media Player Controls

The original site was supposed to feel like a live broadcast, hence no controls. With the slide out menu there’s a discrete place to put some controls so why not. The forward/rewind buttons jump 30 seconds and the skip buttons jump between acts.

The Road to Appiness…

In an effort to behave more app-like, the control bar at the top of the site is replaced with an action button and slide-out menu. This way I’m not struggling to find room for buttons or dealing with popups. Everything is going in the one menu.

Introduction

To decrease time-to-interactive in the #PWA, I integrated the introduction copy into the preloader. The first line of copy appears as the #JavaScript bundle loads up and audio begins streaming. The second line appears as image assets are loaded. If assets are cached, the second screen never appears.

Plugins and Filters

I expanded the StageHand object to accept #plugins. It was necessary to place the #martian plants outside of the window stage. The original War of the Worlds Broadcast was supposed to have the martian plants wither and die before fading away. Using #CSS #filters the plants now turn grey before fading out.

Tripod

In order to add the Tripod heat-ray effect I had to expand the Stage Hand element generation to include a child element. The beam overlays the main walk cycle and fades in and out to create the shooting effect.

Stage Hand

Moving to #CSS #animation simplifies the #JavaScript quite a bit. I threw away all of the #jQuery animation and replaced it with a class that simply adds and removes HTML elements.

SoundBlaster.js

Yes, I named my audio class SoundBlaster. Taken from my #WebAudioAPI #Angular service created for Hypertension. This adds support for the HTML audio element for streaming long clips.

ES6 Refactor

When I created War of the Worlds Broadcast in 2012 it was meant to be a tech demo of #HTML5 multimedia. Web development has changed quite a bit and it’s time to recreate it as a modern tech demo. HTML5 media is commonplace now, but the process and approach of building it is much more […]

War of the Worlds Broadcast

On the night of October 30th, 1938, Orson Welles and the Mercury Theater on the Air presented a dramatization of the HG Wells Classic “The War of the Worlds”. Their play took the form of a series of news bulletins portraying a realistic-sounding fictional Martian invasion. Those who tuned in late missed the introduction of […]