html5 规范: http://www.w3.org/TR/html5/
html video: http://www.w3school.com.cn/html5/html5_video.asp
使用createElement动态创建HTML对象:
http://www.webjx.com/JavaScript/20080220/javascript_js_4449.html
var KEY_TV = "TV";
var iframetag = null;
function keypress(e)
{
try {
console.log("Main keypress");
if (e.keyIdentifier == "TV") {
console.log("TV is pressed");
//var video_vid=window.frames[0].window.document.getElementById("vid");
//video_vid.pause();
//video_vid.parentNode.removeChild(video_vid);
window.history.back();
//window.frames[0].window.history.back();
}
return true;
}
catch (e) {
console.log("XXXXXXXXXXXXXXXXXXXXXXXXXXX keypress error: " + e);
}
}
function onLoad()
{
try {
IdentifyBrowser();
InputObj = new InputObject();
InputObj.AddEventListener(InputObj.EVENT_KEY_PRESS, keypress);
iframetag = new IFrameTag(0,0,"100%","100%",0,gRootElement,"video.html");
}
catch (e) {
console.log("XXXXXXXXXXXXXXXX onLoad error: " + e);
}
}