mozilla
Vos résultats de recherche

    TelephonyCall

    Cet article nécessite une relecture technique.

    Nos bénévoles n'ont pas encore traduit cet article en Français. Aidez-nous à réaliser cette tâche !

    Non-standard
    This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

    This API is available on Firefox OS for internal applications only.

    Summary

    Represents one telephone call, providing information about the call and offering mechanisms for controlling it and detecting changes to its status.

    Properties

    TelephonyCall.number Read only
    A string indicating the phone number corresponding to the call.
    TelephonyCall.state Read only
    A string indicating the status of the call.

    Event Handlers

    TelephonyCall.onalerting
    A function to be called when the call alerts, while awaiting a connection with a carrier.
    TelephonyCall.onconnected
    A function to be called once the call is connected.
    TelephonyCall.onconnecting
    A function to be called after dialing, while awaiting acceptance by the remote party.
    TelephonyCall.ondialing
    A function to be called when the call begins dialing the number.
    TelephonyCall.ondisconnected
    A function to be called after the call has finished disconnecting.
    TelephonyCall.ondisconnecting
    A function to be called when the call begins to disconnect.
    TelephonyCall.onincoming
    A function to call when an incoming call is detected.
    TelephonyCall.onstatechange
    A function to be called when the state of the call changes.

    Methods

    TelephonyCall.answer()
    Answers an incoming call.
    TelephonyCall.hangUp()
    Hangs up the call.
    TelephonyCall.hold()
    Allows to put a call on hold.
    TelephonyCall.resume()
    Allows to get back a call putted on hold.

    TelephonyCall also inherit methods from EventTarget:

    EventTarget.addEventListener()
    Register an event handler of a specific event type on the EventTarget.
    EventTarget.removeEventListener()
    Removes an event listener from the EventTarget.
    EventTarget.dispatchEvent()
    Dispatch an event to this EventTarget.

    Specifications

    This is a non standard implementation, but it is discussing at W3C as part of the System Application Working Group.

    Specification Status Comment
    Web Telephony API Editor's Draft Editor Draft (WIP).

    Browser compatibility

    For obvious reasons, support is primarily expected on mobile browsers.

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support Not supported Not supported Not supported Not supported Not supported
    Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support Not supported 12.0 (12.0) Not supported Not supported Not supported

    See also

    Étiquettes et contributeurs liés au document

    Contributors to this page: Sheppy, MHasan, fscholz, teoli, kscarfone, Jeremie, hsinyi
    Dernière mise à jour par : fscholz,