User:Shellylin/InputPort: Difference between revisions

→‎Basic Port Interface: Added a new attribute to indicate the current connection status
(→‎Basic Port Interface: Added a new attribute to indicate the current connection status)
Line 20: Line 20:
     readonly attribute InputPortType type;
     readonly attribute InputPortType type;
     readonly attribute MediaStream stream;
     readonly attribute MediaStream stream;
    readonly attribute boolean connected;
             attribute EventHandler onconnect;
             attribute EventHandler onconnect;
             attribute EventHandler ondisconnect;
             attribute EventHandler ondisconnect;
Line 36: Line 37:
The media content of this input port, represented as a MediaStream object.<br />
The media content of this input port, represented as a MediaStream object.<br />
The reference of this object remains unchanged during the life time of its belonging InputPort; Dispatch of connect or disconnect event responses to the state of hardware connection, isolating to the fact of whether the media content is playable or not; Behaviour of stream with non-playable content should be the same as behavior of muted media tracks, described in section "[http://w3c.github.io/mediacapture-main/getusermedia.html#life-cycle-and-media-flow Life-cycle and Media Flow]".
The reference of this object remains unchanged during the life time of its belonging InputPort; Dispatch of connect or disconnect event responses to the state of hardware connection, isolating to the fact of whether the media content is playable or not; Behaviour of stream with non-playable content should be the same as behavior of muted media tracks, described in section "[http://w3c.github.io/mediacapture-main/getusermedia.html#life-cycle-and-media-flow Life-cycle and Media Flow]".
'''connected''' of type boolean, readonly<br />
True if this input port is connected to a source provider, and vice versa.


'''onconnect''' of type EventHandler,<br />
'''onconnect''' of type EventHandler,<br />
Confirmed users
220

edits