Re: Telephony API draft updated

Hello,

On Mon, Nov 19, 2012 at 12:35 PM, EDUARDO FULLEA CARRERA <efc@tid.es> wrote:
> Hi,
>
> Please note that an update version of the Telephony API proposal has been uploaded:
> http://sysapps.github.com/sysapps/proposals/Telephony/Telephony.html
>
> This version incorporate feedback received on the first draft, mainly (may not be comprehensive):
> -removing record functionality
> -Changes in the states: removing 'error' and 'busy', adding 'accepted' and 'waiting'
> -Adding two state diagrams for inbound and outbound calls.
> -An issue note has been created indicating that it needs to be decided whether the state transitions (both in diagrams and textual description) are normative or not, as there is no consensus among the editors

Before taking up that discussion, I would like to raise a new issue
perhaps easier to agree upon.

Since telephony user experience of today is consistent with it, I
think it would make sense to have the HW related call controls (audio,
mike, ...) in the context of a telephone call, rather than on the main
telephony interface (where it gives the impression of a system
interface, irrespective of whether is there a telephony service
available or any call in progress - whereas it is should be just a
facade to these system controls from the context of a call).

Therefore I propose moving these controls to a separate interface, and
include it in TelephonyCall.  The WebIDL would become the following:

[NoInterfaceObject]
interface Telephony : EventTarget {
    readonly attribute DOMString[]     ownTelNumbers;
    readonly attribute DOMString[]     emergencyNumbers;
    readonly attribute TelephonyCall   active;
    readonly attribute TelephonyCall[] calls;
    TelephonyCall dial (DOMString number, DialParams params);
    void          startTone (DOMString tone);
    void          stopTone ();
    void          sendTone (DOMString tone);
             attribute EventHandler    onincoming;
             attribute EventHandler    oncallschanged;
};

[NoInterfaceObject]
interface TelephonyMediaControl {
    attribute boolean          speakerEnabled;
    attribute boolean          headsetEnabled;
    attribute double            audioVolume;
    attribute boolean          audioMuted;
    attribute double            micVolume;
    attribute boolean          micMuted;
    /**
     * examples for future extension (remove me)
     * attribute boolean          frontCameraEnabled;
     * attribute boolean          backCameraEnabled;
     * attribute boolean          sendingLocalVideoEnabled;
     * attribute boolean          receivingRemoteVideoEnabled;
     */
}

[NoInterfaceObject]
interface TelephonyCall : EventTarget {
    readonly attribute TelephonyMediaControl controls;
    readonly attribute DOMString    number;
    readonly attribute DOMString    state;
    readonly attribute DOMError     error;
    readonly attribute DOMString?   reason;
    void answer ();
    void disconnect ();
    void hold ();
    void resume ();
    void redirect (DOMString redirectNumber);
             attribute EventHandler onstatechange;
             attribute EventHandler ondialing;
             attribute EventHandler onalerting;
             attribute EventHandler onaccepted;
             attribute EventHandler onconnecting;
             attribute EventHandler onconnected;
             attribute EventHandler ondisconnecting;
             attribute EventHandler ondisconnected;
             attribute EventHandler onholding;
             attribute EventHandler onheld;
             attribute EventHandler onresuming;
             attribute EventHandler onredirecting;
             attribute EventHandler onerror;
};

Best regards,
Zoltan

Received on Friday, 23 November 2012 09:24:54 UTC