|
|
| Line 1: |
Line 1: |
| == Status == | | == Goals == |
|
| |
|
| Implemented in {{bug||674726}}
| | The aim of WebTelephony is to establish a DOM API, which allows web content to dial out and mediate incoming calls. |
|
| |
|
| == Proposed API == | | == Status == |
|
| |
|
| (lkcl29dec11: remember also to include data calls as well as voice calls, so that internet access can be initiated)
| | WebTelephony meta bug: {{bug||674726}} |
| | B2G meta telephony bug: {{bug||699235}} |
|
| |
|
| navigator.telephony would return an object with the following interface
| | == Implementation Specifics == |
|
| |
|
| interface Telephony : EventTarget {
| | === DOM API === |
| TelephonyCall dial(DOMString number); // Returns a object in "dialing" state
| |
| attribute boolean muted; // Should these live on the call/group?
| |
| attribute boolean speakerEnabled;
| |
|
| |
| attribute any active; // Active call, for now. Could be a group in the future.
| |
|
| |
| readonly attribute TelephonyCall[] calls;
| |
|
| |
| void startTone(DOMString tone);
| |
| void stopTone();
| |
|
| |
| attribute Function onincoming;
| |
| attribute Function oncallschanged;
| |
| }
| |
|
| |
| interface TelephonyCall : EventTarget {
| |
| readonly attribute DOMString number;
| |
|
| |
| readonly attribute DOMString state;
| |
| // "dialing", "ringing", "busy", "connecting", "connected", "disconnecting", "disconnected", "incoming"
| |
|
| |
| attribute Function onstatechange;
| |
| attribute Function onringing;
| |
| attribute Function onbusy;
| |
| attribute Function onconnecting;
| |
| attribute Function onconnected;
| |
| attribute Function ondisconnecting;
| |
| attribute Function ondisconnected;
| |
|
| |
| void answer(); // Should this make the call the active one?
| |
| void hangUp();
| |
| }
| |
|
| |
| interface CallEvent : Event {
| |
| readonly attribute TelephonyCall call;
| |
| }
| |
|
| |
|
| === Proposal: Enhance telephony call states to hold a call === | | === Proposal: Enhance telephony call states to hold a call === |