WebAPI/WebTelephony: Difference between revisions

Jump to navigation Jump to search
m
format editing
No edit summary
m (format editing)
Line 59: Line 59:
=== Proposal: Enhance WebTelephony API to hold a call  ===
=== Proposal: Enhance WebTelephony API to hold a call  ===


interface nsIDOMTelephony : nsIDOMEventTarget
  interface nsIDOMTelephony : nsIDOMEventTarget
  {
  {
nsIDOMTelephonyCall dial(in DOMString number);
  nsIDOMTelephonyCall dial(in DOMString number);
   
   
attribute boolean muted;
  attribute boolean muted;
attribute boolean speakerEnabled;
  attribute boolean speakerEnabled;
   
   
// The call that is "active", i.e. receives microphone input and tones
  // The call that is "active", i.e. receives microphone input and tones
// generated via startTone.
  // generated via startTone.
readonly attribute jsval active;
  readonly attribute jsval active;
   
   
// Array of all calls that are currently connected.
  // Array of all calls that are currently connected.
readonly attribute jsval calls;
  readonly attribute jsval calls;
   
   
void startTone(in DOMString tone);
  void startTone(in DOMString tone);
void stopTone();
  void stopTone();
   
   
attribute nsIDOMEventListener onincoming;
  attribute nsIDOMEventListener onincoming;
attribute nsIDOMEventListener oncallschanged;
  attribute nsIDOMEventListener oncallschanged;
  };
  };
   
   
  interface nsIDOMTelephonyCall : nsIDOMEventTarget
  interface nsIDOMTelephonyCall : nsIDOMEventTarget
  {
  {
readonly attribute DOMString number;
  readonly attribute DOMString number;
   
   
// "dialing", "ringing", "busy", "connecting", "connected", "disconnecting", "disconnected", "incoming"
  // "dialing", "ringing", "busy", "connecting", "connected", "disconnecting", "disconnected", "incoming"
// Add new states: "holding", "held", "resuming"
  // Add new states: "holding", "held", "resuming"
readonly attribute DOMString state;
  readonly attribute DOMString state;
   
   
void answer();   
  void answer();   
void hangUp();
  void hangUp();
   
   
//make a "connected" call into "held"
  //make a "connected" call into "held"
void holdCall();  
  void holdCall();  
//make a "held" call back to "connected"
  //make a "held" call back to "connected"
void resumeCall();  
  void resumeCall();  
   
   
attribute nsIDOMEventListener onstatechange;
  attribute nsIDOMEventListener onstatechange;
   
   
attribute nsIDOMEventListener ondialing;
  attribute nsIDOMEventListener ondialing;
attribute nsIDOMEventListener onringing;
  attribute nsIDOMEventListener onringing;
attribute nsIDOMEventListener onbusy;
  attribute nsIDOMEventListener onbusy;
attribute nsIDOMEventListener onconnecting;
  attribute nsIDOMEventListener onconnecting;
attribute nsIDOMEventListener onconnected;
  attribute nsIDOMEventListener onconnected;
attribute nsIDOMEventListener ondisconnecting;
  attribute nsIDOMEventListener ondisconnecting;
attribute nsIDOMEventListener ondisconnected;
  attribute nsIDOMEventListener ondisconnected;
   
   
// attribute nsIDOMEventListener onincoming;
  // attribute nsIDOMEventListener onincoming;
/* new events */
  /* new events */
attribute nsIDOMEventListener onholding;  
  attribute nsIDOMEventListener onholding;  
attribute nsIDOMEventListener onheld;  
  attribute nsIDOMEventListener onheld;  
attribute nsIDOMEventListener onresuming;  
  attribute nsIDOMEventListener onresuming;  
  };
  };
Confirmed users
978

edits

Navigation menu