Closed olafgithub closed 5 months ago
X_ITE used the jquery-fullscreen-plugin and according to its documentation:
This only works when the code was triggered by a user interaction (For example a onclick event on a button). Browsers don't allow entering fullscreen mode without user interaction.
Nevertheless you could trigger a fullscreen (by a user interaction) if you do:
<script src="https://code.jquery.com/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery-fullscreen-plugin/jquery.fullscreen.min.js"></script>
<x3d-canvas src="some/world.x3d"></x3d-canvas>
<script>
$("x3d-canvas") .fullScreen (true);
</script>
See: https://github.com/code-lts/jquery-fullscreen-plugin
Nevertheless it is always possible to trigger fullscreen (by a user interaction) with pure JavaScript.
Thanks!
I can see the problem. (On the console) When I have time I will find a workaround.
Olaf
I will close this issue now, but feel free to reopen again, or a new issue.
I embedded X_ITE on an HTML page and like the page to start with the X_ITE window in fullscreen mode. Just like when selecting fullscreen from the right-click context menu.
Is there an attribute for the x3d-canvas element to do this? Or do you do this in the CSS style? Or can I do it using the browser in JavaScript code? Like after browser = X3D.getBrowser ( ... ); browser.fullscreen = "true"?
I searched for quite a long while in the documentation, but could not find anything,
Thanks,
Olaf