Audio Pipeline & Spatial Audio
This page covers audio routing, volume management, and 3D spatial attenuation in Quest 3D WebView.
1. System WebView Audio (Default Path)
By default, audio generated by web pages (YouTube, Spotify, HTML5 video, Web Audio API) plays through Android's standard system audio output.
- Benefits: Full compatibility with encrypted DRM, Media Source Extensions (MSE/blob), and all streaming media types.
- Control: Use
SetMediaVolume(Volume)andSetMediaMuted(bMuted)to control loudness.
2. 3D Spatial Audio (Opt-In Direct Media Path)
For experiences requiring 3D positional audio (where sound attenuates with distance from the screen in 3D space):
Configuration Steps:
- Select
QuestWebViewComponentin the Details Panel. - Under Quest WebView | Audio:
- Set
bUse3DSpatialAudio=True. - Assign a
SpatialMediaPlayer(UMediaPlayer). - Select a
SpatialAudioComponent(UMediaSoundComponent) on your Actor.
- Set
- Configure your sound attenuation settings (inner/outer radius, spatialization method) directly on the
MediaSoundComponent. - When a direct media URL (e.g.
.mp4,.webm) is detected on the webpage, the audio stream is seamlessly routed to the spatial component!
Fallback Behavior
If a video uses Media Source Extensions (blob URLs like YouTube), audio automatically routes through the reliable System WebView audio path to guarantee uninterrupted playback.