HDMI 视频
Estimated reading time: 1 minute
BRAVIA商用显示器允许您将HDMI输入嵌入到应用程序中,如下所述。 需要设置 width
属性和 height
属性。
<object type="application/x-decimated-video" width="960" height="540"></object>
默认情况下,最后一个输入源(例如HDMI1)显示在矩形中。 可以使用输入按钮和遥控器上的CH +/-按钮更改它。 它也可以通过使用IP控制来改变。
如果页面包含两个或多个HDMI视频对象,则只正确显示一个元素。 如果页面包含一个HDMI视频对象和一个或多个媒体元素 (<video>
和 <audio>
元素), HDMI视频对象将不能正确显示。
方法
- void setWideMode(DOMString mode) The
setWideMode
method fills the rectangle with video by stretching. It may be needed when showing 4:3 video source in the decimated-video.setWideMode
has the following parameters:- DOMString
mode
'16:9'
is used to fill a 16:9 rectangle with video.'normal'
is used to show a video as-is.
- DOMString
- 举例说明 请下载 a sample application. 下面展示如何将抽取的HDMI视频窗口嵌入到应用程序中。
// Widemode-key detection. document.addEventListener( 'keydown', function(e) { if (e.keyCode == VK_PICTURE) { OnPictureKey(); }} ); // Toggle wide mode. var cur_wide_mode = 'normal'; function OnPictureKey() { if (cur_wide_mode == 'normal') { cur_wide_mode = '16:9'; } else { cur_wide_mode = 'normal'; } document.getElementById('DecimetedVideo').setWideMode(cur_wide_mode); }
Last modified: 10 Jun 2022