User:Shellylin/InputPort
Jump to navigation
Jump to search
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; };
Specific Port Interfaces
A/V
interface AVInputPort : InputPort { }
DVI
interface DVIInputPort : InputPort { }
HDMI/DisplayPort
interface HDMIInputPort : InputPort { }
interface DisplayPortInputPort : HDMIInputPort { }