In my cocos2d-JS based game, user has to use an arrow key to control the character. The problem is when the game starts, keyboard events are not received by the gameplay layer until the player clicks anywhere inside the game.
I thought the issue might get solved by putting 'focus' on the Game-Canvas element. So I tried to use the following code:
// set focus to the canvas when the video ends
But it doesn't make any difference. What could be the solution to this problem? (I cannot make the user to click the game screen)
Hope someone helps me with this ASAP... Thanks in advance...