Confirmed users
220
edits
| Line 39: | Line 39: | ||
'''onconnect''' of type EventHandler,<br /> | '''onconnect''' of type EventHandler,<br /> | ||
'''ondisconnect''' of type EventHandler,<br /> | '''ondisconnect''' of type EventHandler,<br /> | ||
Whenever the hardware detects a connection/disconnection of this input port, UA must queue a task to fire a simple event name connect/disconnect. | Whenever the hardware detects a connection/disconnection of this input port, UA must queue a task to fire a simple event name connect/disconnect at its InputPort object. | ||
=== Specific Port Interfaces === | === Specific Port Interfaces === | ||
==== A/V ==== | ==== A/V ==== | ||
''In reality, a specific input port has its specific attributes and methods, our goal is to collect those "common" cases as much as possible. However, for now with limit information and partner supports, we will not focus on implementing hardware dependent attributes and methods in this draft.'' | |||
interface AVInputPort : InputPort { | interface AVInputPort : InputPort { | ||
// Possible hardware-dependent attributes. | |||
} | } | ||
| Line 63: | Line 63: | ||
This will be an object in <code>window.navigator</code> named <code>InputPortManager</code> with the following interface: | This will be an object in <code>window.navigator</code> named <code>InputPortManager</code> with the following interface: | ||
[AvailableIn=CertifiedApps] | |||
partial interface Navigator { | partial interface Navigator { | ||
readonly attribute InputPortManager inputPortManager; | readonly attribute InputPortManager inputPortManager; | ||
| Line 68: | Line 69: | ||
interface InputPortManager { | interface InputPortManager { | ||
Promise getInputPorts (); | |||
}; | }; | ||
'''getInputPorts'''<br /> | |||
This method makes a request to retrieve all the available input ports on a device. It returns a new Promise that will be used to notify the caller about the result of the operation, which is an array of InputPort elements belong to the InputPortManager. | |||
== Examples == | == Examples == | ||