JavaScript Play Sound on Document Ready without Human Interact

  • Status: Open
  • Prize: $10
  • Entries Received: 13

Contest Brief

MandarinNu.com is a Chinese language teaching web app, which is generated by React Native Expo.
We want to show users sample dialog module on page load with sound.
https://mandarinnu.com

Right now, a user has to click anywhere on the page in order for the cartoon characters to speak.
(You could try :)

What we want is let sound play on page load.

What we tried is to place the following code inside the <body> tag, but not work as expected.
<script>
document.addEventListener("DOMContentLoaded", function(event) {
document.getElementById('hi').click();
});
</script>

We prefer not using jQuery if not necessary, as jQuery is not used at any other places in the application.

The first correct solution will be paid.

Recommended Skills

Public Clarification Board

  • mbsheikh2018
    mbsheikh2018
    • 1 week ago

    Please check my entry #21

    • 1 week ago

How to get started with contests

  • Post your contest

    Post Your Contest Quick and easy

  • Get tons of entries

    Get Tons of Entries From around the world

  • Award the best entry

    Award the best entry Download the files - Easy!

Post a Contest Now or Join us Today!