Prototyping 19 November 2012: Difference between revisions

From XPUB & Lens-Based wiki
Line 17: Line 17:


The BBC World Service produces and releases an [http://www.bbc.co.uk/news/world-17434527 hourly "headlines" recording]
The BBC World Service produces and releases an [http://www.bbc.co.uk/news/world-17434527 hourly "headlines" recording]
* [http://wsdownload.bbc.co.uk/worldservice/css/96mp3/latest/bbcnewssummary.mp3 audio feed (high quality)
* [http://wsdownload.bbc.co.uk/worldservice/css/96mp3/latest/bbcnewssummary.mp3 audio feed (high quality)]


* HTML5 media events (timeupdate, durationchange, seeked)
* HTML5 media events (timeupdate, durationchange, seeked)
* [http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#mediaevents HTML5 media events]
* [http://automatist.org/poc/aaplayer/ogg.html Live demo of HTML5 player events]


== Part 2: Headline scrambler ==
== Part 2: Headline scrambler ==

Revision as of 12:58, 19 November 2012

The origin and theory of the cut-up, annotated audio, essay on ubuweb.

Shuffle

Javascript doesn't include a built-in function to shuffle an array, but there are lots of "recipes" to do it.

For instance: http://stackoverflow.com/questions/6274339/how-can-i-shuffle-an-array-in-javascript

var shuffle = function (o) {
    for (var j,x,i=o.length; i; j=parseInt(Math.random()*i), x=o[--i], o[i] = o[j], o[j] = x);
    return o;
}

Part 1: Audio cut-up

The BBC World Service produces and releases an hourly "headlines" recording

  • HTML5 media events (timeupdate, durationchange, seeked)

Part 2: Headline scrambler

  • Example of "walking the tree"
  • DOM (childNodes, nodeType, nodeValue, nodeName?)
  • Recursive tree / search