How to simulate the play even without clicking through the code below
Hi,
how to simulate the play even without clicking through the code below:
function registerKeyHandler() {
document.addEventListener('keydown', function (e) {
switch (e.keyCode) {
case 13: // Enter
player.toggleFullscreen();
break;
case 10252: // MediaPlayPause
case 415: // MediaPlay
case 19:
player.playPause();
break;
case 413: // MediaStop
player.stop();
break;
case 48: //Key 0
log();
break;
case 49: //Key 1
setUhd();
break;
case 50: //Key 2
player.getTracks();
break;
case 51: //Key 3
player.getProperties();
break;
case 10009: // Return
if (webapis.avplay.getState() !== 'IDLE' && webapis.avplay.getState() !== 'NONE') {
player.stop();
} else {
tizen.application.getCurrentApplication().hide();
}
break;
default:
log("Unhandled key");
}
});
}