MC3300 webbrowser warning sound

Hi there,

I am creating an webapp for the MC3300. I want a warning sound when the scanned code is incorrect.

It's already working on my android mobile and tablet. But it is not working on the MC3300.

How to tackle this problem?

Thank you,

Arthur

Joydeep Chakraborty
Please share your source code

Please share your source code .

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Arthur Zitter
Here is the source;<!DOCTYPE

Here is the source;

<!DOCTYPE html>

<html lang="en">

<head>

    <title>Soundtest MC3300</title>

    <meta charset="ISO-8859-1" />

    <meta name="viewport" content="width=device-width, initial-scale=1"/>

    <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>

</head>

<body>

<p>Beep after input (search) via ajax</p>

<button type="button" id="search">Search</button>

<button id="play" type="button">Play</button>

<div id="warning">When there is a class "beep" play a sound</div>

<script>

    $(document).ready(function(){

        $("#search").on("click", function () {

            var audio = new Audio("https://www.soundjay.com/misc/bell-ringing-01.wav");

            $.ajax({

                type: "POST",

                url: "sound_ajax.php",

                success: function(resp){

                    $("#warning").addClass(resp);

                    $("#warning").html("Loaded ");

                    // Does not work

                    if ($("#warning").hasClass("beep") == true) {

                        var audio = new Audio("https://www.soundjay.com/misc/bell-ringing-01.wav");

                        audio.play();

                        $("#warning").append("1");

                    } else {

                        $("#warning").append("1 failed");                    }

                },

                error: function(e) {

                    console.log("error", e);

                },

                complete: function(){

                    // werkt niet

                    if ($("#warning").hasClass("beep") == true) {

                        var audio = new Audio("https://www.soundjay.com/misc/bell-ringing-01.wav");

                        audio.play();

                        $("#warning").append("2");

                    } else {

                        $("#warning").append("2 failed");                    }

                }

            })

        });

        $("#play").on("click", function() {

            var audio = new Audio("https://www.soundjay.com/misc/bell-ringing-01.wav");

            audio.play();

        });

    });

</script>

</body>

</html>

and the call to the ajax source;

<?php

sleep(1);

echo "beep";

?>

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Arthur Zitter
I just send you the code by

I just send you the code by email.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Arthur Zitter
Solved​Run the app via EB and

Solved

​Run the app via EB and the sound works.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments