# HTML5 panner.SetVelocity

**URL:** <https://forums.unrealengine.com/t/html5-panner-setvelocity/397440>\
**Category:** Platform & Builds\
**Tags:** panner, HTML5, unreal-engine, question\
**Created:** [July 15, 2017, 11:23pm UTC](https://forums.unrealengine.com/t/html5-panner-setvelocity/397440 "2017-07-15T23:23:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HaxO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haxo/32/1008648_2.png) [@HaxO](https://forums.unrealengine.com/u/HaxO)\
**Post date:** [July 15, 2017, 11:23pm UTC](https://forums.unrealengine.com/t/html5-panner-setvelocity/397440/1 "2017-07-15T23:23:06Z")

</div>

Hey guys,

Ran into a weird error on Chrome v 59.0.3071.115 Firefox,Safari, and Edge still work fine.

The only information on it that I have found is about the panner.setVelocity being obsolete from Mozilla: [PannerNode.setVelocity() - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/setVelocity)

The error only seems to come up around 90% of the play throughs (Game is very short) and not at the same spot each time.  
Really leaning towards maybe an emscripten error?

> **[WebAudio: Deprecate Doppler Effect - Chrome Platform Status](https://chromestatus.com/feature/5238926818148352)**
>
> The W3C Audio Working Group has removed the doppler effect from the PannerNode as part of the rework of the PannerNode. The methods panner.setVelocity() and listener.setVelocity() and the attributes listener.speedOfSound and listener.dopplerFactor...

This link seems to point towards a change in audio doppler effects. How could that be stopped in the engine?

Tried getting rid of all of the panners in my materials and all kinds of different build settings. Tried 4.14.3 + 4.15.3

 ![192115-html5error.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/e/35eb1673ef656016893ad8802f8f8243b3ae4c47.png)

Image attached is the error in questions.

Any advice or ideas or direction are welcome!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f0fea7ad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f0fea7ad](https://forums.unrealengine.com/u/anonymous_user_f0fea7ad)\
**Post date:** [July 16, 2017, 2:00pm UTC](https://forums.unrealengine.com/t/html5-panner-setvelocity/397440/2 "2017-07-16T14:00:28Z")

</div>

Try updating to latest UE 4.16, that should fix the issue.

The problem here is that Google decided to remove already released functionality from Web Audio spec, which broke all web sites out there that use Web Audio doppler effects on Google Chrome. Other browsers did the removal better by making the .setVelocity() function do nothing (but still exist, so that already released web pages will not break). Emscripten removed the use of .setVelocity() about a year ago, which I think went in to UE4 some time between 4.15 and 4.16 releases.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f0fea7ad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f0fea7ad](https://forums.unrealengine.com/u/anonymous_user_f0fea7ad)\
**Post date:** [July 16, 2017, 2:02pm UTC](https://forums.unrealengine.com/t/html5-panner-setvelocity/397440/3 "2017-07-16T14:02:03Z")

</div>

If for some reason you are not able to update to newer UE4 but would like to work around this issue in the existing version, then you can also try just editing all the build output .js files, and search for “xxx.setVelocity(…)” calls and wrap those in /\* xxx.setVelocity(…) \*/ comments. If I recall correctly, there should be exactly two such places where that appears.

---

<div class="post-metadata">

**Author:** ![HaxO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haxo/32/1008648_2.png) [@HaxO](https://forums.unrealengine.com/u/HaxO)\
**Post date:** [July 17, 2017, 5:23pm UTC](https://forums.unrealengine.com/t/html5-panner-setvelocity/397440/4 "2017-07-17T17:23:18Z")

</div>

Alright, I will give that a shot first since this project recently gave me a lot of trouble getting it into 4.15. Will update

---

<div class="post-metadata">

**Author:** ![HaxO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haxo/32/1008648_2.png) [@HaxO](https://forums.unrealengine.com/u/HaxO)\
**Post date:** [July 19, 2017, 8:36pm UTC](https://forums.unrealengine.com/t/html5-panner-setvelocity/397440/5 "2017-07-19T20:36:55Z")

</div>

Commenting out the panner.setVelocity in the Game-HTML5.js caused a lot of other issues. Ended up porting the project to 4.16 and got it working as suggested in your first post. Now everything besides the GUI elements are rendering black, but that is another issue. Thanks for all the help!
