User:Shellylin/InputPort: Difference between revisions
Jump to navigation
Jump to search
| Line 16: | Line 16: | ||
== Proposed API == | == Proposed API == | ||
=== Basic interface === | === Basic interface === | ||
enum InputPortTypeEnum { | enum InputPortTypeEnum { “av”, “dvi”, "hdmi", "displayport" }; | ||
interface InputPort { | interface InputPort { | ||
| Line 26: | Line 26: | ||
attribute EventHandler ondisconnect; | attribute EventHandler ondisconnect; | ||
}; | }; | ||
== Interfaces for sprcific ports == | |||
== Examples == | == Examples == | ||
Revision as of 10:24, 15 August 2014
Goals
Provide DOM API access to the input ports of devices. With InputPort API, application developers are able to browse available input ports of the current device, retrieve media content provided by a particular port, detect whether an input port has connected to a source provider.
Contributors
Status
Features
- Enumerate available input ports on the current device. Supported types of input ports include A/V, VGA and HDMI.
- Retrieve media content from an input port, provided by its source provider. Presented as a MediaStream object.
- Read and write the attributes of a selected input port.
- Examples of input port attributes: frame rate, color system, aspect ratio...etc.
- Support hotplug detection on each input port.
Proposed API
Basic interface
enum InputPortTypeEnum { “av”, “dvi”, "hdmi", "displayport" };
interface InputPort {
readonly attribute DOMString name;
readonly attribute DOMString uuid;
readonly attribute InputPortTypeEnum type;
readonly attribute MediaStream stream;
attribute EventHandler onconnect;
attribute EventHandler ondisconnect;
};