RemoteScreenAudioStream interface
extends AudioStream REMOTE
A remote participant's screen-share audio stream. Available via p.screen.audio when the publisher included audio in their screen share. SDK auto-plays it like any remote audio.
Blueprint
Members added on top of AudioStream. Routing control (pause / resume) is bundle-level on the parent RemoteScreenStream โ not on this audio stream.
p.screen.pause() the SDK pauses the bundle (both video and audio bytes); the audio's streamState mirrors the screen's. There's no separate pause() on this audio stream.Properties (added)
Plus inherited from AudioStream: id, codec, isPlaying, isMuted, isEnded.
streamState
Routing state of this screen-audio stream. Mirrors the parent screen's state โ when p.screen.pause() is called, both transition to "paused". No frozen / stuck values (audio doesn't have decoder-freeze observation).
audioLevel
Current screen-audio level, normalized 0..1. Useful for visualizing system-audio activity (game audio, music) on a presentation.
Methods (added)
Plus inherited from AudioStream: attach / detach (escape hatch โ SDK auto-plays by default), getStats, getMediaStreamTrack.
setVolume
Adjust the playback volume of this participant's screen audio in the SDK-managed audio element. Independent from their mic volume โ useful when their game audio is too loud relative to their voice.
setInterval(() => {
if (p.audio?.audioLevel > 0.6) {
p.screen?.audio?.setVolume(0.2); // duck game audio while talking
} else {
p.screen?.audio?.setVolume(0.8);
}
}, 200);
Events
No own events. State transitions (paused / ended / etc.) fire on the parent p.screen via state-changed; this audio stream's streamState just mirrors the parent.
attach() โ the SDK creates an internal audio element and plays it automatically (subject to browser autoplay policies). Use attach only for custom output device routing or Web Audio integration.See also: AudioStream RemoteScreenStream LocalScreenAudioStream RemoteParticipant