Audio Optimizations
Last updated
Last updated
All devices have an inherent limitation on the number of audio/video streams they can run in parallel.
Platform | No of parallel audio streams |
---|---|
If you feel there's no audio in Mobile, but there in the Desktop version - it's probably because Mobile devices are strict about getting a user interaction before allowing audio to play. For this you need to either
Enable "Click to start" in project settings.
OR start audio only after the user clicks on something in the experience (like a banner/ text or a play icon)
If you want to control this behaviour separately for mobile vs desktop, you can use a variable device_var
to check if the user is on mobile and then create Rules to make the experience behave differently for mobile vs desktop access.
There is a hard limit on the number of Audio elements (including both Audio and TTS elements) that can be added in a single scene. While you can add up to 60 audio elements in a single scene, our recommended limit is ~20.
NOTE: Audio elements get downloaded completely before the scene can start, so the number of audio elements will add to the scene load time and also increase resource (CPU and RAM) consumption.
There are 2 approaches to work around this restriction:
Re-use the same audio element to play different audio parts at different instances using the "play from" event.
Break the scene down into multiple scenes so that the total number of Audio elements doesn't exceed 60 per scene.
iOS devices don't support volume controls. This has two implications:
No volume control icon on top of the experience in iOS devices.
Volume control rules don't work on iOS devices.
All audio files get entirely downloaded at the start of the scene. So try keeping the size of the audio files low. Recommended file size for audio elements: less than 2MB
Desktop/Laptop
7
Androids Phones
7
iOS Phones
7