Talk:WebAPI/WebTelephony: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 6: | Line 6: | ||
interface Telephony : EventTarget { | interface Telephony : EventTarget { | ||
TelephonySession newSession(DOMString number); // Multiple number call?? | TelephonySession newSession(DOMString number); // Multiple number call?? | ||
readonly attribute TelephonySession liveSession; | |||
attribute Function onincoming; | attribute Function onincoming; | ||
} | } | ||
interface TelephonySession : EventTarget { | interface TelephonySession : EventTarget { | ||
// Do the call | |||
void call(); | |||
attribute boolean muted; | |||
attribute boolean speakerOn; | |||
void startTone(DOMString tone); | |||
void stopTone(); | |||
void sendTones(DOMString tones, | |||
[optional] unsigned long toneDuration, | |||
[optional] unsigned long intervalDuration); | |||
readonly attribute DOMString originNumber; | readonly attribute DOMString originNumber; | ||
readonly attribute DOMString number; | readonly attribute DOMString number; | ||
readonly attribute DOMString readyState; // "calling", "incomming", "connected", "closed", "busy" | readonly attribute DOMString readyState; // "calling", "incomming", "connected", "closed", "busy" | ||
// Can we get info on when a call goes from "trying to place call" to "calling"? | // Can we get info on when a call goes from "trying to place call" to "calling"? | ||
Revision as of 12:03, 7 September 2011
Counter proposal:
navigator.telephony would return an object with the following interface
interface Telephony : EventTarget {
TelephonySession newSession(DOMString number); // Multiple number call??
readonly attribute TelephonySession liveSession;
attribute Function onincoming;
}
interface TelephonySession : EventTarget {
// Do the call void call();
attribute boolean muted;
attribute boolean speakerOn;
void startTone(DOMString tone);
void stopTone();
void sendTones(DOMString tones,
[optional] unsigned long toneDuration,
[optional] unsigned long intervalDuration);
readonly attribute DOMString originNumber;
readonly attribute DOMString number;
readonly attribute DOMString readyState; // "calling", "incomming", "connected", "closed", "busy"
// Can we get info on when a call goes from "trying to place call" to "calling"?
attribute Function onconnect;
attribute Function ondisconnect;
attribute Function onbusy;
void answer(); // Should this make the session the active one?
void hangUp();
}
interface IncomingCallEvent : Event {
readonly attribute TelephonySession session;
}