Re: VideoStreamTrack: takePhoto()

On Tue, Apr 9, 2013 at 8:21 AM, Harald Alvestrand <harald@alvestrand.no> wrote:
> It seems to me that futures (what I understand of them) are easily able to
> implement the "one query, one result" semantic of a callback-based API.

Yes, they're good at representing something that will become a value
at some point in time.


> I think event-based machinery is appropriate when the number of things that
> can happen is indeterminate (0, 1 or many); onaddstream is a typical
> example.
> Is there a version of futures that permits capturing this semantic too?

No, you would just use events for that. takePhoto() however uses
events for a semantic getMediaStream() uses callbacks for. Why do you
keep missing this particular comment?


--
http://annevankesteren.nl/

Received on Tuesday, 9 April 2013 08:14:00 UTC