Added example-video.js#4
Added example-video.js#4nathaniellee wants to merge 2 commits intogetify:masterfrom nathaniellee:master
Conversation
…ML5 video element. This is just a starting point... much more that can be added here...
…y reduces the API. Not sure if I'm understanding the goal of the project correctly... maybe I'm just looking at it from the wrong perspective...
|
starting to work on video, now. #2 above is a bogus comment, disregard. :) also, I want to expose a |
|
Hi Kyle, That's a cool idea, but doesn't it kind of go against the point of the library which was to just instate the facade over existing features of the HTML5 modules? Like you said, it's basically a combination of features from two modules rather than an actual feature of one of the individual modules... Cheers, Nathaniel |
|
@nathaniellee yeah, i see your point. hmmmm.... |
|
Just to point out, there is in scope of h5ive the ability to define some sugar/helpers, they just need to be very thin and close to the bare metal. So, it's kind of a judgement call. In this case, I'm still not sure one way or the other. On one hand, "snapshot" is an extremely common use-case (probably the most common) for hooking up a video media-stream to a For reference, I just up'd the first pass at the Bottom line: light sugar is OK for a facade. still unclear if |
|
I've been struggling to figure out how to work HTML5 video into the concept of this facade. The video object itself really doesn't have much to it as far as methods are concerned... the real "meat" of it is in the events. It may or may not be important to note that I work at a company that focuses on the online video space, and the project I've been working on pretty much the whole time I've been there is a video player that serves up either a Flash-based player or an HTML5 video player based on the user's platform. We happen to use the animation frame loop quite a bit here so I'll be interested in checking out what you did with that facade. We basically just assign the appropriate request method to an |
|
I still haven't made up my mind on if the "events" should be a core centralized thing, or if they should be handled individually by each module. I have strong arguments for both. Obviously, the video element is going to have a lot more events than something like canvas. So if we're doing a centralized system, it should be one that's not too heavy for that lighter module case. But there's no question that there are important API functionalities in Also, keep in mind, some of these modules are very simple, and that's perfectly OK. It doesn't have to be (and probably SHOULDN'T be) a really complex module to justify itself. |
|
Took a quick look at your animation frame facade code... just curious if there's a particular reason why there isn't a fallback offered in case the user's browser doesn't support any of those methods? Or is that beyond the goal of this library? Generally, we do something like this: |
|
@nathaniellee From the README:
I definitely want to keep out of scope anything that looks like polyfills or other things like that, because that's a whole different set of motivations, and brings a whole different set of bugs and problems to deal with. For instance, the Instead, what I hope is, that 'h5ive' can be a good building block that people use for their own needs, including polyfills. In fact, having a companion project, or a 'contrib' folder in 'h5ive' for wrappers for various things like that, that's certainly a plausible thing. But I want to keep the main core and modules to that more limited focus. In the case of BTW, that snippet shows that I want the
FYI, I believe the "fallback" scenario for requestAnimationFrame is slightly more complex in the robust case... this is what I currently use: https://gist.github.com/3004342#file_raf.js BTW, that same gist shows my |
|
OK... so I think I've got it... no fallbacks since it would be up to the developer to decide what kind of fallback code they want to use...? ... I've seen Mr. Moller's post in the past when we were first investigating whether there was something better than what we were doing with the 1000 / 60 technique. Ultimately we decided that while it was a really nice polyfill, we didn't necessarily need it since we tended to call Great little piece of code, though... |
yes, that's a fair statement.
sure, I was merely pointing out that a generalized polyfill for the purposes of a "contrib" section of this library would need to be a bit more robust. |
|
@getify about |
|
@jpass -- that sort of functionality is perfectly legitimate, and will be quite useful! But it's more for a contrib library, or other framework, on top of h5ive, rather than part of h5ive proper. The restrained design goal of h5ive is to build thin facades that expose existing functionality in similar (or better) APIs, not to add entirely new composed API functionalities (which is what a lot of other frameworks do). |
Starting point for a suggestion of the HTML5 video element wrapper.