mirror of
https://github.com/bevyengine/bevy
synced 2024-11-24 21:53:07 +00:00
audio and browsers section for wasm examples (#8625)
# Objective - Help users better understand audio issues in wasm ## Solution - Describe some of the known issues, and some of the workarounds
This commit is contained in:
parent
ad8875958d
commit
25f013ba1b
2 changed files with 18 additions and 0 deletions
|
@ -52,6 +52,9 @@ git checkout v0.4.0
|
|||
- [WASM](#wasm)
|
||||
- [Setup](#setup-2)
|
||||
- [Build & Run](#build--run-2)
|
||||
- [WebGL2 and WebGPU](#webgl2-and-webgpu)
|
||||
- [Audio in the browsers](#audio-in-the-browsers)
|
||||
- [Optimizing](#optimizing)
|
||||
- [Loading Assets](#loading-assets)
|
||||
|
||||
# The Bare Minimum
|
||||
|
@ -244,6 +247,12 @@ Bevy has an helper to build its examples:
|
|||
|
||||
This helper will log the command used to build the examples.
|
||||
|
||||
### Audio in the browsers
|
||||
|
||||
For the moment, everything is single threaded, this can lead to stuttering when playing audio in browsers. Not all browsers react the same way for all games, you will have to experiment for your game.
|
||||
|
||||
In browsers, audio is not authorized to start without being triggered by an user interaction. This is to avoid multiple tabs all starting to auto play some sounds. You can find more context and explanation for this on [Google Chrome blog](https://developer.chrome.com/blog/web-audio-autoplay/). This page also describes a JS workaround to resume audio as soon as the user interact with your game.
|
||||
|
||||
### Optimizing
|
||||
|
||||
On the web, it's useful to reduce the size of the files that are distributed.
|
||||
|
|
|
@ -70,6 +70,9 @@ git checkout v0.4.0
|
|||
- [WASM](#wasm)
|
||||
- [Setup](#setup-2)
|
||||
- [Build & Run](#build--run-2)
|
||||
- [WebGL2 and WebGPU](#webgl2-and-webgpu)
|
||||
- [Audio in the browsers](#audio-in-the-browsers)
|
||||
- [Optimizing](#optimizing)
|
||||
- [Loading Assets](#loading-assets)
|
||||
|
||||
# The Bare Minimum
|
||||
|
@ -533,6 +536,12 @@ Bevy has an helper to build its examples:
|
|||
|
||||
This helper will log the command used to build the examples.
|
||||
|
||||
### Audio in the browsers
|
||||
|
||||
For the moment, everything is single threaded, this can lead to stuttering when playing audio in browsers. Not all browsers react the same way for all games, you will have to experiment for your game.
|
||||
|
||||
In browsers, audio is not authorized to start without being triggered by an user interaction. This is to avoid multiple tabs all starting to auto play some sounds. You can find more context and explanation for this on [Google Chrome blog](https://developer.chrome.com/blog/web-audio-autoplay/). This page also describes a JS workaround to resume audio as soon as the user interact with your game.
|
||||
|
||||
### Optimizing
|
||||
|
||||
On the web, it's useful to reduce the size of the files that are distributed.
|
||||
|
|
Loading…
Reference in a new issue