How does one fix "policy violation: accelerometer is not allowed in this document." (vanilla-tilt.min)

So I'm currently working on a project which in this case is a FiveM (GTA 5) server and within my console I constantly have this message popping up whenever the tilt library is used.

Vanilla Tilt: (https://micku7zu.github.io/vanilla-tilt.js/)

Message that displays per each element in my HTML that uses Vanilla tilt: Permissions policy violation: accelerometer is not allowed in this document. (https://cdnjs.cloudflare.com/ajax/libs/vanilla-tilt/1.8.0/vanilla-tilt.min.js:1) The deviceorientation events are blocked by permissions policy. See https://github.com/w3c/webappsec-permissions-policy/blob/master/features.md#sensor-features (https://cdnjs.cloudflare.com/ajax/libs/vanilla-tilt/1.8.0/vanilla-tilt.min.js:1)

Vanilla_tilt_policy_violation

My HTML document is getting length so below is its code in short. I have 5 divs holding the class "dcard" which corresponds to the above image one per each.

<html>

<head>
    <link rel="stylesheet" href="reset.css" type="text/css">
    <link rel="stylesheet" href="style.css" type="text/css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <script src="nui://game/ui/jquery.js" type="text/javascript"></script>
</head>

<body>
    <!-- Hide container after -->
    <div id="container" hidden>

        <!-- DEPARTMENT CARDS -->
        <div class="dcards">
            <div hidden class="dcard" id="Civilian" data-tilt data-tilt-max="20" data-tilt-reverse="true" data-tilt-scale="1.25" data-tilt data-tilt-glare data-tilt-max-glare="0.8">
                <div class="dcase">
                    <div class="dcase-name civ-name">
                        <h1>Civilian</h1>
                    </div>
                    <div class="dcase-logo civ">
                        <img src="./images/norp.png" class="logo"/>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/vanilla-tilt/1.8.0/vanilla-tilt.min.js"></script>
    <script src="./script.js" type="text/javascript"></script>

</body>

I read through the documentation that was provided however I can't figure out what to put and where, I'm assuming its as easy as adding a line somewhere within my HTML. Or if its not doable some way to suppress the message so it doesn't appear within the console.

Any help would be appreciated!



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation