Video-JS interaction updates in templates
There have been small changes every day - same as I said previously applies (about slow progress at this early stage despite regular work on this project).
I have updated the media control component and the Flash (vPlayer.swf) video player object. Reminder: I put the things that I absolutely cannot do with “pure” web techniques (HTML/CSS/JS) into a Flash object, and that is playing audio and video and to do so in a way that still lets the video interact with the rest of the page.
So I worked on this interface and the interaction between Flash and the page. The result is the Media Control (play/stop/sound vol. up/down, etc.) box at the top of the course page (see homepage, first course - explanation there). The things you cannot see is callbacks from Flash to the JS in the page, and that I organized the three layers I talked about earlier - so lots of changes “under the hood” have happened.
One - there is global Javascript needed for all courses. Two - if someone provides their own template (see last changelog-blog entry), they can customize the interaction between elements in their own HTML in their own JS file(s), and use the API of [ONE] to get info from the Video object (example: the user interface, i.e. the course template, probably wants to exchange the “Stop” for the “Play” image or text when the video play status changes, and much more) and to the object (example: user presses the “Play” button -> start the video).
Three - The course itself, which basically consists of JS files - later generated from XML, now written manually - describing the behavior, and which (text,img,etc.) objects go where and when into what spaces (DIVs) in the template (which can be any course template, completely altering look&feel).
Right now I still have the issue that Flash does not send a “completed” event when the Video is over, as it should (Update one day later: got it - as usual, my fault!). I get all cue point events (to trigger actions on page), volume setting works, pause/resume works.
Next task: adding cue points - I use manual AS cue points and not FLV embedded cue points, following the strategy to put as much as I can into the standard web techniques and not into Flash. Embedded cue points will be supported, I have to add to the JS init function and the Flash object code that queries all embedded cue points and sends them to JS before setting the manual ones. Also, I’m going to disable any cue points that are not for the courses to avoid that they trigger events - which cue point is for the course is determined by its syntax/name.
Mörre