When I build and run the game I am getting following message in console window.
Failed to execute ‘requestFullscreen’ on ‘Element’: API can only be initiated by a user gesture.
This is the place where the issue is triggered in “main.js”
cc.view.enableAutoFullScreen(
cc.sys.browserType !== cc.sys.BROWSER_TYPE_BAIDU &&
cc.sys.browserType !== cc.sys.BROWSER_TYPE_WECHAT &&
cc.sys.browserType !== cc.sys.BROWSER_TYPE_MOBILE_QQ
);
I am using Cocos Creator v1.6.2
How do I fix this issue (I do want the game to go into full screen mode) ?