You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Berk, Matthew P" <ma...@intel.com> on 2012/08/15 18:48:34 UTC

Question about Platform development

I am currently working on adding Win8 as a platform. I have some questions about the APIs. Where would be the best place to ask these questions?
Thanks for the help!
-Matt Berk

RE: Question about Platform development

Posted by "Berk, Matthew P" <ma...@intel.com>.
Ah, great to hear!
Onto the question...

In the incubator-cordova-js  repo, in lib/common/plugin/Media.js, it defines Media.onStatus. When should this function be called? I call it and send the correct arguments when the media is stopped, when the duration is found, and when the position is found. However, I am unsure of what to do for two situations. when should I call it for a media error? It seems like the code already handles the errors and calling this function will add unneeded calls. 
For the second situation, the code lists:
	if (msg === Media.MEDIA_STATE) {
		if (value === Media.MEDIA_STOPPED) {
			if (media.successCallback) {
				media.successCallback();
			}
		}
		if (media.statusCallback) { // HERE
			media.statusCallback(value);
		}
	}
For the noted (// HERE) 'if' statement, when should I call this? The api does not describe it, and I have not found any clear definition of it. Any suggestions?

-----Original Message-----
From: brian.leroux@gmail.com [mailto:brian.leroux@gmail.com] On Behalf Of Brian LeRoux
Sent: Wednesday, August 15, 2012 9:57 AM
To: callback-dev@incubator.apache.org
Subject: Re: Question about Platform development

right here!

On Wed, Aug 15, 2012 at 9:48 AM, Berk, Matthew P <ma...@intel.com> wrote:
> I am currently working on adding Win8 as a platform. I have some questions about the APIs. Where would be the best place to ask these questions?
> Thanks for the help!
> -Matt Berk

Re: Question about Platform development

Posted by Brian LeRoux <b...@brian.io>.
right here!

On Wed, Aug 15, 2012 at 9:48 AM, Berk, Matthew P
<ma...@intel.com> wrote:
> I am currently working on adding Win8 as a platform. I have some questions about the APIs. Where would be the best place to ask these questions?
> Thanks for the help!
> -Matt Berk