# Starting FMOD audio from web browser

**URL:** <https://qa.fmod.com/t/starting-fmod-audio-from-web-browser/16519>\
**Category:** Unity\
**Created:** [December 4, 2020, 11:01am UTC](https://qa.fmod.com/t/starting-fmod-audio-from-web-browser/16519 "2020-12-04T11:01:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![FishEyes95](https://avatars.discourse-cdn.com/v4/letter/f/8c91f0/32.png) [@FishEyes95](https://qa.fmod.com/u/FishEyes95)\
**Post date:** [December 4, 2020, 11:01am UTC](https://qa.fmod.com/t/starting-fmod-audio-from-web-browser/16519/1 "2020-12-04T11:01:33Z")

</div>

Hi everyone,

I am wondering if someone would be able to give me some guidance on getting FMOD audio in my Unity project to play on a WebGL build.

I am referencing this page about how user interaction is required to start audio in Chrome and Safari:  
[https://fmod.com/resources/documentation-api?version=2.1&page=platforms-html5.html#safari-and-chrome-browser-user-interaction-requirement-use-for-all-browsers](https://fmod.com/resources/documentation-api?version=2.1&page=platforms-html5.html#safari-and-chrome-browser-user-interaction-requirement-use-for-all-browsers)

The line of code that is used as an example - where would that be placed in your Unity project? Or is that written as part of embedding within your website?

Cheers!

- Tom

---

<div class="post-metadata">

**Author:** ![Andrew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/andrew/32/261_2.png) [@Andrew](https://qa.fmod.com/u/Andrew)\
**Post date:** [December 7, 2020, 2:33am UTC](https://qa.fmod.com/t/starting-fmod-audio-from-web-browser/16519/2 "2020-12-07T02:33:47Z")

</div>

The referenced code goes in your website.

---

<div class="post-metadata">

**Author:** ![FishEyes95](https://avatars.discourse-cdn.com/v4/letter/f/8c91f0/32.png) [@FishEyes95](https://qa.fmod.com/u/FishEyes95)\
**Post date:** [December 8, 2020, 5:28am UTC](https://qa.fmod.com/t/starting-fmod-audio-from-web-browser/16519/3 "2020-12-08T05:28:36Z")

</div>

Thanks for your quick response, Andrew.

Whereabouts would I put that code in my website if I am using Wordpress?

Cheers,

- Tom

---

<div class="post-metadata">

**Author:** ![FishEyes95](https://avatars.discourse-cdn.com/v4/letter/f/8c91f0/32.png) [@FishEyes95](https://qa.fmod.com/u/FishEyes95)\
**Post date:** [December 8, 2020, 11:48am UTC](https://qa.fmod.com/t/starting-fmod-audio-from-web-browser/16519/4 "2020-12-08T11:48:57Z")

</div>

Hi Andrew,

I’ve just realised that Wordpress appears to use HTML (still learning, evidently). Is there any way to action that example but in HTML?

The project is embedded on my site, but I’m struggling to get any audio going.

---

<div class="post-metadata">

**Author:** ![Andrew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/andrew/32/261_2.png) [@Andrew](https://qa.fmod.com/u/Andrew)\
**Post date:** [December 9, 2020, 4:09am UTC](https://qa.fmod.com/t/starting-fmod-audio-from-web-browser/16519/5 "2020-12-09T04:09:27Z")

</div>

Embed the javascript in your HTML. Check this out to get started :

> **[embed javascript in wordpress - Google Search](https://www.google.com/search?q=embed%2Bjavascript%2Bin%2Bwordpress&oq=embed%2Bjavascr&aqs=chrome.2.0i457j69i57j0l6.3247j0j7&sourceid=chrome&ie=UTF-8)**

---

<div class="post-metadata">

**Author:** ![FishEyes95](https://avatars.discourse-cdn.com/v4/letter/f/8c91f0/32.png) [@FishEyes95](https://qa.fmod.com/u/FishEyes95)\
**Post date:** [December 10, 2020, 3:35am UTC](https://qa.fmod.com/t/starting-fmod-audio-from-web-browser/16519/6 "2020-12-10T03:35:53Z")

</div>

Thanks for that info.

I added the Javascript into the header of my website. I’m still struggling to get any audio to play from my project, though. I am hosting the Unity project on [simmer.io](http://simmer.io). Is this possibly the issue? Should I be embedding the project directly onto my website in order for it to work?

Cheers,

- Tom

---

<div class="post-metadata">

**Author:** ![Andrew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/andrew/32/261_2.png) [@Andrew](https://qa.fmod.com/u/Andrew)\
**Post date:** [December 11, 2020, 12:57am UTC](https://qa.fmod.com/t/starting-fmod-audio-from-web-browser/16519/7 "2020-12-11T00:57:50Z")

</div>

Yep, that could be the issue. Maybe try reaching out to the [simmer.io](http://simmer.io) community? I’m sure someone else has probably come across the same problem.
