User:Shellylin/InputPort: Difference between revisions
Jump to navigation
Jump to search
| Line 23: | Line 23: | ||
readonly attribute InputPortTypeEnum type; | readonly attribute InputPortTypeEnum type; | ||
readonly attribute MediaStream stream; | readonly attribute MediaStream stream; | ||
readonly attribute DOMString resolution; | |||
readonly attribute DOMString aspect; | |||
attribute EventHandler onconnect; | attribute EventHandler onconnect; | ||
attribute EventHandler ondisconnect; | attribute EventHandler ondisconnect; | ||
}; | }; | ||
'''name''' of type DOMString, readonly<br /> | |||
The name of this input port, e.g. "HDMI1", "HDMI2". | |||
'''type''' of type InputPortTypeEnum, readonly<br /> | |||
The type of this input port, e.g. "av", "displaypoty". | |||
'''stream''' of type MediaStream, readonly<br /> | |||
The stream represents the media content provided by this input port. | |||
'''resolution''' of type DOMString, readonly<br /> | |||
The video resolution of this inport, e.g. 480i, 1080p, VGA. | |||
=== Specific Port Interfaces === | === Specific Port Interfaces === | ||
Revision as of 04:00, 18 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;
readonly attribute DOMString resolution;
readonly attribute DOMString aspect;
attribute EventHandler onconnect;
attribute EventHandler ondisconnect;
};
name of type DOMString, readonly
The name of this input port, e.g. "HDMI1", "HDMI2".
type of type InputPortTypeEnum, readonly
The type of this input port, e.g. "av", "displaypoty".
stream of type MediaStream, readonly
The stream represents the media content provided by this input port.
resolution of type DOMString, readonly
The video resolution of this inport, e.g. 480i, 1080p, VGA.
Specific Port Interfaces
A/V
interface AVInputPort : InputPort {
}
DVI
interface DVIInputPort : InputPort {
}
HDMI/DisplayPort
interface HDMIInputPort : InputPort {
}
interface DisplayPortInputPort : HDMIInputPort {
}