Skip to content
Live Audio Room

Room music

Play a song from a phone to the room, on its own track or mixed with the microphone.

controller.music plays a song from this phone to the room.

final music = controller.music;
await music.start(path: cachedSongFile); // a downloaded server song works the same way
music.setPublishVolume(0.8); // what the room hears
music.setPlayoutVolume(0.5); // this phone's speaker
await music.pause();
await music.resume();
await music.seek(const Duration(seconds: 30));
music.onFinished.listen((_) {
  // next song
});
await music.stop();

Choose a mode

Set VoxeraAudioRoomConfig.roomMusicMode:

VoxeraRoomMusicMode.track (default)VoxeraRoomMusicMode.aux
How it's sentOn a second track, room-musicMixed into the microphone, after echo cancellation
Listeners can mute only the musicYesNo
Data per listenerAbout 50 MB per hourAbout 31 MB per hour at 48 kbps
Mic buttonMutes the voiceMutes the voice, and the song keeps going

In aux mode, a host muting the seat silences both the voice and the song, and unmuting brings the song back.