Hi Grig, I have been doing some implementation of an HTML5 video and audio solution. I want the API to look like the HTML5 video API as possible. I checked in some code in lps/components/av/html5 which wraps an HTML <video> element. There are a couple of tests in test/html5/app2.lzx
I've been testing with an iPad, so have been trying to ensure that the playback works there. Note that to initiate playback the first time, a direct user event has to be used, so I discovered that 'mousedown' events work on buttons to start playback, but "onclick" will not, because it uses some callback and thus is not a direct chain of calls from the mouse event. I am not sure if you can get frame-level accuracy of playback, but there are periodic updates to the "current time" that come back from the browser. I was experimenting with Flash fallback players, and I have an implenentation using the "Strobe" player from Adobe, but it's kind of heavyweight, so the jPlayer would be preferable if it works. I've been starting to try to integrate it, but I think what you said is true that there are problems if you try to add the element dynamically to the DOM, so I'd love to figure out how to make that work, so that the fallback from HTML to Flash is totally transparent. On Sat, Jan 22, 2011 at 2:37 AM, Grig <[email protected]> wrote: > Hi Henry, > > I've been hot on the trail of a solid solution that works on iOS devices as > well as the rest of the HTML5 ready browsers. (WebKit,etc) > > I just got off the phone with a client who wants to see if I can control > sprites on top of a video clip. Do you know if it's possible to control > playback with frame accuracy? > > I'm about to jump into it by bootstrapping JPlayer (the best I've found) > into an OL app I'm working on. I chose JPlayer because I found that on my > iPad or iPhone, it plays back properly and gets the onfinished events even > when the device is in locked mode with the screen off! :) This is essential > to my master plan to write a streaming radio station in HTML. ;) > > Earlier builds of JPlayer didn't work, and it was obvious JPlayer was > actually working as expected, so I emailed the developer to find out what it > was... > > He told me that he discovered that it's very important that the <audio> & > <video> tags are not dynamically added and removed and that these devices > "don't act right" when they are not left as static elements in the page. > > My hope is that if you are building out media for HTML5, you'll be able to > consider the playback issues, including receiving the onFinished events when > the device is "sleeping". > > Also, I'm glad to help, and I have lots of real-life test cases to try it > out with. > > Cheers! > Grig > > -- Henry Minsky Software Architect [email protected]
