salvadordf / CEF4Delphi

CEF4Delphi is an open source project to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows, Linux and MacOS.
https://www.briskbard.com/forum/
Other
1.19k stars 363 forks source link

Cannot get Pointer Lock API to work with CEF4Delphi #473

Closed PTz0uAH closed 11 months ago

PTz0uAH commented 11 months ago

Hoi @salvadordf,

Working with the CEF api since DCEF3 and now migrated to CEF4Delphi.. it seems great!

There is a problem when opening pages with pointer-lock-api such as https://mdn.github.io/dom-examples/pointer-lock/

I cannot get it to work.. the demo page works with Firefox and even Chrome..

That is a real show-stoppen for me.. am I missing something or is it a bug?

salvadordf commented 11 months ago

Hi,

That API is only supported by CEF if you enable the Chrome runtime mode.

Open the MiniBrowser demo and enable this line. Then open the web page to test the pointer lock and it will work correctly.

The Chrome runtime mode is in experimental state. Some features are not implemented or don't work as expected. See if everything works fine in your application in Chrome runtime mode or switch to WebView4Delphi where the pointer-lock-api works fine too.