Skip to content

Automatically enter AR mode on page load #5760

@ivoras

Description

@ivoras

I have this test page:

<html>
<head>
  <title>A-Frame AR Scene</title>
  <script src="https://aframe.io/releases/1.7.0/aframe.min.js"></script>
</head>
<body>
<a-scene
            renderer="alpha: true;"
            webxr="mode: ar; requiredFeatures: hit-test; referenceSpaceType: local;"
            xr-mode-ui="enabled: true; XRMode: ar"
            vr-mode-ui="enabled: false"
            style="background: transparent;"
>

    <a-box position="0 0 -2" color="red"></a-box>
    <a-camera position="0 0 0"></a-camera>
  </a-scene>
</body>
</html>

I want the page to automatically switch into AR mode on page load without the user clicking the "AR" button. Is it possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions