於 2012年03月24日 19:21, JOSE MANUEL CANTERA FONSECA 提到:
>
> El 24/03/12 01:10, "Jonas Sicking"<
jo...@sicking.cc> escribió:
>
>> On Fri, Mar 23, 2012 at 3:34 AM, JOSE MANUEL CANTERA FONSECA
>> <
jm...@tid.es> wrote:
>>> Hi there,
>>>
>>> Some comments on the latest Telephony API at [1].
>>>
>>> 1.The calls array is the set of calls which are currently 'connected'.
>>> I assume that would also include calls connected but held, right?
>> Yes.
>>
>>> 2. What's the use case for the 'oncallschange' event handler?
>> Hmm.. I forget the specifics. But it's to enable getting notified when
>> a call is placed. Currently you get notified (through the onincoming
>> event) when someone calls into the phone, but you don't get notified
>> when the call places a call.
> Wouldn't it be better to have an 'outgoing' event to indicate that an
> outgoing call has been launched?. It would be more elegant and easier to
> understand its purpose.
>
> On the other hand it seems confusing the oncallschange because the calls
> array would only change when a call is connected or disconnected ... I
> don't know if I'm missing something ...
Yes, the calls array change when an incoming call is answered, an
outgoing call is made successfully and call disconnected.
I also agree that oncallschanged seems confusing and could be replaced
with more specific events.
If only from the perspective of dialer, outgoing event seems not
necessary because the outgoing call is made from UI, right?
But if other application needs this event, I think adding the outgoing
event on Telephony would be a good idea.
Also, looks like ondilaing on TelephonyCall shouldn't be there. It
implies the same as onoutgoing on Telephony.
There should also be onconnected and ondisconnected events to indicate a
call is added in or removed from the calls array.
Other question, when is onbusy on TelephonyCall needed in the current
design? I cannot get the point ...
I reviewed my last proposal, and a new proposal on Telephony and
TelephonyCall is shown below
or in
https://wiki.mozilla.org/WebAPI/WebTelephony#Proposal:_Enhance_WebTelephony_API_to_hold_a_call
interface nsIDOMTelephony : nsIDOMEventTarget
{
attribute nsIDOMEventListener onincoming;
//attribute nsIDOMEventListener oncallschanged;
/* new events */
attribute nsIDOMEventListener onoutgoing;
attribute nsIDOMEventListener onconnected;
attribute nsIDOMEventlistener ondisconnected;
}
interface nsIDOMTelephonyCall : nsIDOMEventTarget
{
readonly attribute DOMString number;
// "dialing", "alerting", "busy", "connecting", "connected", "disconnecting", "disconnected", "incoming"
// Add new states: "holding", "held", "resuming"
readonly attribute DOMString state;
void answer();
void hangUp();
//make a "connected" call into "held"
void hold();
//make a "held" call back to "connected"
void resume();
attribute nsIDOMEventListener onstatechange;
//attribute nsIDOMEventListener ondialing;
attribute nsIDOMEventListener onalerting;
attribute nsIDOMEventListener onbusy;
attribute nsIDOMEventListener onconnecting;
attribute nsIDOMEventListener onconnected;
attribute nsIDOMEventListener ondisconnecting;
attribute nsIDOMEventListener ondisconnected;
// attribute nsIDOMEventListener onincoming;
/* new events */
attribute nsIDOMEventListener onholding;
attribute nsIDOMEventListener onheld;
attribute nsIDOMEventListener onresuming;
};
>>> 3. I think holdCall and resumeCall should be renamed to 'hold' and
>>> 'resume' as these are within a Call context.
>> Good point, I agree.
>>
>>> 4. At this respect I don't know if the latest suggested changes such as
>>> changing 'ringing' by 'alerting' have been implemented
>> I don't think it has.
This issue has been implemented. Related modification has been made in
the new proposal as well.
Thanks,
Hsinyi
>>
>> / Jonas
>
> Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
> This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at
>
http://www.tid.es/ES/PAGINAS/disclaimer.aspx
> _______________________________________________
> dev-webapi mailing list
>
dev-w...@lists.mozilla.org
>
https://lists.mozilla.org/listinfo/dev-webapi