Wiley samsung smarttv application development 111882802x

Page 115

#player_container.show {

opacity: 1;

}

Next, declare the Web API library, which includes the AV Player within the index.html file. Then declare an anchor for the player. <script type="text/javascript" language="javascript" src="$MANAGER_WIDGET/ Common/webapi/1.0/webapis.js"></script> <a href="javascript:void(0);" id="anchor_player" onkeydown="Main.player. keyDown();"></a>

The declared anchor_player anchor is focused and receives remote control key events while a VOD file is playing. For example, the remote control play or stop key events can be implemented to play or stop the VOD playing. See the next code for the handler function that is used by the anchor_player. Main.player.keyDown = function() { var keyCode = event.keyCode; switch(keyCode) { case tvKey.KEY_RETURN: event.preventDefault(); break; case tvKey.KEY_PLAY: break; case tvKey.KEY_STOP: break; default: break; } };

08. Hands Frame Application 1 – Basic Version

113


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.