volorio_audio_room

High-level Flutter SDK for audio party rooms, voice chat rooms, live audio communities, stage rooms, social audio apps, and moderated group conversation experiences.

This package combines Volorio RTC voice, RTM presence, chat, realtime engagement, and heartbeat-based usage billing into one mobile-friendly API.

Keywords

Flutter audio room SDK, voice chat room, social audio app, party room, group voice call, live audio, RTC voice, RTM presence, realtime chat, Volorio.

Install

dependencies:
  volorio_audio_room: ^0.2.0

Architecture

The Flutter app never stores a Volorio API key.

  1. Flutter app calls your backend.
  2. Your backend uses volorio_server with apiKey.
  3. Volorio validates clientId, projectId, product entitlements, quality, free minutes, wallet balance, and quota.
  4. Your backend returns the short-lived VolorioRoomSession JSON to Flutter.
  5. volorio_audio_room joins the room and runs heartbeat automatically.

Required identifiers

Identifier Used by Flutter? Used by backend? Secret?
clientId Yes, public app identity Yes, required for Volorio session create No
projectId Yes Yes No
apiKey No Yes Yes

Flutter usage

import 'dart:convert';

import 'package:http/http.dart' as http;
import 'package:volorio_audio_room/volorio_audio_room.dart';
import 'package:volorio_core/volorio_core.dart';

final audioRoom = VolorioAudioRoomClient(
  sessionLoader: (request) async {
    final response = await http.post(
      Uri.parse('https://your-api.example.com/volorio/audio-room/session'),
      headers: {'content-type': 'application/json'},
      body: jsonEncode({
        'clientId': request.clientId,
        'projectId': request.projectId,
        'roomId': request.roomId,
        'identity': request.identity,
        'displayName': request.displayName,
      }),
    );

    if (response.statusCode < 200 || response.statusCode >= 300) {
      throw Exception('Could not create Volorio session: ${response.body}');
    }

    return VolorioRoomSession.fromJson(
      jsonDecode(response.body) as Map<String, Object?>,
    );
  },
);

await audioRoom.join(
  const VolorioAudioRoomJoinRequest(
    clientId: 'app_...',
    projectId: 'proj_...',
    roomId: 'party-room-123',
    identity: 'user_123',
    displayName: 'Oguzhan',
  ),
);

await audioRoom.setMicrophoneEnabled(false);
await audioRoom.sendChatText('Hello party room');
await audioRoom.rte.sendReaction(
  roomId: 'party-room-123',
  identity: 'user_123',
  emoji: ':fire:',
);
await audioRoom.leave();

Backend session endpoint

Use volorio_server on your backend:

final session = await volorio.createRoomSession(
  const CreateVolorioRoomSessionInput(
    clientId: 'app_...',
    projectId: 'proj_...',
    roomId: 'party-room-123',
    identity: 'user_123',
    quality: VolorioMediaQuality.voice,
    products: [
      VolorioProductId.rtcVoice,
      VolorioProductId.signaling,
      VolorioProductId.chatMau,
    ],
  ),
);

Billing and free minutes

Volorio bills voice rooms by participant-minute. New accounts can receive a monthly free minute allowance before wallet balance is charged. When the allowance and balance are depleted, Volorio returns 402 during heartbeat and the SDK disconnects the participant.

Typical audio room features

  • Join and leave voice rooms.
  • Enable and disable microphone.
  • Publish presence state.
  • Send realtime chat messages.
  • Send reactions, Q&A, and poll events.
  • Automatically stop when wallet/free usage is exhausted.

Libraries

volorio_audio_room