javascript - Confirm dialog box while using HTML5 pointer lock API -


i trying out pointer lock api using demo page. while running code seeing browser showing confirmation dialog box asking whether user wants hide mouse pointer. there way prevent dialog box appearing programmatically users have seamless experience ?

your question might broad, since depends on implementation, i.e. particular browser. that’s faint clue “no”.

other web apis getusermedia() or getcurrentposition() or requestfullscreen() require confirmation, , might intended way. user should retain control @ time. pointer-lock, unexperienced user trapped. that’s strong hint “no”.

in browsers (like firefox), can click “always allow” in order not asked again domain. can set global flags: regarding webrtc, instance, set media.navigator.permission in firefox or media-stream-camera in chrome. while lead users so, might additional evidence can’t programmatically this, hence “no”.

what specs say? not high-level permission-asking. rather define happens right after permission or denial. while geolocation , fullscreen don’t, media capture @ least mentions method “prompts user permission”.

there doesn’t seem chance 1 day can prevent permission request code. seem have stick other means deliver seamless experience, sensual first-time explanation or tutorial encourages users grant permission.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -