2 function getVideoURI(baseFileName)
5 (document.createElement("video").
6 canPlayType('video/ogg; codecs="theora"') == "") ? "mp4" : "ogv";
7 return "./content/" + baseFileName + "." + fileExtension;
10 function consoleWrite(text)
12 if (!consoleDiv && document.body)
14 consoleDiv = document.createElement('div');
15 document.body.appendChild(consoleDiv);
17 var span = document.createElement("span");
18 span.appendChild(document.createTextNode(text));
19 span.appendChild(document.createElement('br'));
20 consoleDiv.appendChild(span);
23 function waitForEventAndRunStep(eventName, element, func, stepTest)
25 var eventCallback = function(event)
27 consoleWrite("EVENT(" + eventName + ")");
32 eventCallback = stepTest.step_func(eventCallback);
34 element.addEventListener(eventName, eventCallback, true);