Verriflo Documentation

website·Indexed 30 days ago

https://docs.verriflo.com

Education infrastructure for building live classrooms. Includes a REST API for managing rooms, participants, and recordings, a Flutter SDK for native mobile integration, and AI Agent and AI Tutor APIs for conversational and real-time student assistance.

Tokens
29.3K
Snippets
143
Records
204
Agent score
50%

What's inside Verriflo

  1. Overview of Verriflo Flutter SDK components

    The Verriflo Flutter SDK allows developers to embed live classrooms into mobile applications using a WebView-based architecture to ensure feature parity with the web platform. Key components include:

    • VerrifloPlayer: A drop-in widget for rendering the classroom with built-in controls.
    • VerrifloClient: The API client used for creating and joining rooms.
    • VerrifloPlayerController: Provides programmatic control, such as forcing a user to leave or changing video quality.
    • Event System: Callbacks to handle classroom lifecycle events (e.g., class ended, user kicked, or reconnection).
    • State Management: Tools to track and respond to connection status.
    • Quality Control: Supports both auto-adaptive and manual quality selection.
  2. Handle Verriflo classroom lifecycle events

    Events of type verriflo_classroom notify the parent application about the classroom's lifecycle. These are used to trigger redirects, notifications, or UI cleanups.
    // Example Payload
    {
      "type": "verriflo_classroom",
      "action": "class_ended"
    }
  3. Connect to the AI Agent API

    The AI Agent API (branded as AI API) provides conversational AI capabilities supporting text, voice, and image inputs. All API endpoints are hosted under the base URL: https://api.verriflo.com/v1/ai-agent.
  4. Understand the Verriflo SFU Architecture

    Verriflo uses a Selective Forwarding Unit (SFU) model to enable one-to-many streaming. Instead of a peer-to-peer model where an instructor must upload a separate stream to every student, the instructor uploads their video stream exactly once to the Verriflo servers. The SFU then forwards that stream to all connected students, keeping the instructor's bandwidth requirements constant regardless of the number of participants.
  5. Understand Media Tracks and Subscriptions

    A track is a single media stream (audio or video). Instructors publish video tracks (camera), audio tracks (microphone), and optionally screen share tracks. Students subscribe to these tracks automatically via the Verriflo infrastructure. In the Flutter SDK, these are tracked via trackSubscribed and trackUnsubscribed events.
  6. Understand Verriflo Room concepts

    A room is a live classroom session where an instructor broadcasts and students watch. Rooms must be created via the Create Room API before participants can join. Each room is identified by a unique roomId defined by the user. When a teacher ends the class, the room closes for all participants.
    {
      "roomId": "math-101",
      "roomName": "Introduction to Algebra",
      "roomDescription": "Covering chapters 1-3"
    }
  7. Verriflo platform features and AI services

    Verriflo provides a suite of tools tailored for the instructor-to-student dynamic:

    Platform Features:

    • REST API for room and participant management.
    • Web embedding via iframe.
    • Flutter SDK for native mobile apps.
    • Webhooks for class events (start, end, join/leave).

    AI-Powered Services:

    • AI Tutor: Real-time assistant for students.
    • AI API (Voice Agent): Conversational AI supporting text, voice, and images.
    • CDN & Media: Infrastructure for transcoding, storage, and delivery.
  8. Implement a backend-first architecture for Verriflo

    To protect your Organization ID (which acts as an API key), you must never call the Verriflo API directly from the frontend. Exposing the Organization ID in client-side code allows unauthorized users to create rooms, consume credits, or impersonate your organization. The required flow is: Frontend $\rightarrow$ Your Backend $\rightarrow$ Verriflo API.
  9. Integrate with Verriflo Core Services via Server API

    All Verriflo services are accessed through a single Server API endpoint: api.verriflo.com. This API acts as the gateway to the following core services:

    • Live Streaming: SFU-based real-time video classrooms with adaptive quality.
    • AI Tutor (teacher-agent): Context-aware, multi-modal AI assistant for students during live classes.
    • AI API (voice-agent): Conversational AI supporting text, voice, and image I/O with NDJSON streaming responses.
    • CDN & Media (Verriflo-CDN): Video transcoding, cloud storage, and recording management.
    Your Application
        ↓
    Server API (api.verriflo.com)
        ├─→ Live Streaming (LiveKit)
        ├─→ AI Tutor (teacher-agent)
        ├─→ AI API (voice-agent)
        └─→ CDN & Media (Verriflo-CDN)
  10. Verriflo Service Architecture Overview

    Verriflo uses a microservices architecture where all external requests are routed through a unified Server API gateway (api.verriflo.com). This gateway handles authentication, authorization, rate limiting, security, and billing before proxying requests to specialized internal services: Live Streaming, AI Tutor, AI API (voice-agent), and CDN & Media.
  11. Understand Verriflo's geographic distribution

    Verriflo uses a globally distributed media infrastructure to minimize latency. When a room is created, resources are automatically allocated in the region closest to the instructor, and students connect to nearby edge nodes. This process is automatic; developers do not need to configure regions manually.
  12. Verriflo Live Classroom Infrastructure features

    Verriflo provides a managed WebRTC infrastructure for education platforms that includes:

    • Simple API: REST endpoints for room creation, token generation, and recording downloads.
    • Recording: On-demand class recording with files available for download within 6 hours.
    • Adaptive Quality: Simulcast streaming that automatically adjusts quality based on the student's network conditions to prevent buffering.