Skip to main content
Version: 1.1.x

Record Meeting - Flutter

VideoSDK allows you to record video & audio during the meeting. The recording files are available in developer dashboard or you can also choose to store them in your own cloud storage.

VideoSDK also allows you to configure the recording layouts in numerous ways like by simply setting different prebuilt layouts in the configuration or by providing your own custom template to do the recording according to your layout choice.

This guide will provide an overview of how to implement start and stop Meeting Recording.

important

To initiate automatic recording at the beginning of a session, simply provide the autoStartConfig feature recording during room creation. For more information on configuring the autoStartConfig, please refer to the provided documentation here.

startRecording()

startRecording() can be used to start a recording of the meeting which can be accessed from the Room object. This method accepts four parameters:

  • 1. webhookUrl (optional): This would the webhook URL where you would like to listen to event happening for the recording like starting and stopping of recording. It will be triggered when the recording is completed and stored into server. Read more about webhooks here

  • 2. awsDirPath (optional): This parameter accepts the path for the your S3 bucket where you want to store recordings to. To allow us to store recording in your S3 bucket, you will need to fill this form by providing the required values. (VideoSDK Cloud (AWS S3, Azure Blob or GCP ) Integration)

  • 3. config (optional): This parameter will define how the recording should be recorded.

  • 4. transcription (optional): This parameter lets you start post transcription for the recording.

    Map<String, dynamic> config = {
    // Layout Configuration
    layout: {
    type: "GRID", // "SPOTLIGHT" | "SIDEBAR", Default : "GRID"
    priority: "SPEAKER", // "PIN", Default : "SPEAKER"
    gridSize: 4, // MAX : 4
    },

    // Theme of recording
    theme: "DARK", // "LIGHT" | "DEFAULT"

    // `mode` is used to either record video & audio both or only audio.
    mode: "video-and-audio", // "audio", Default : "video-and-audio"

    // Quality of recording and is only applicable to `video-and-audio` type mode.
    quality: "high", // "low" | "med", Default : "med"

    // This mode refers to orientation of recording.
    // landscape : Record the meeting in horizontally
    // portrait : Record the meeting in vertically (Best for mobile view)
    orientation: "landscape", // "portrait", Default : "landscape"
    };

    // Post Transcription Configuration
    Map<String, dynamic> transcription = {
    "enabled": true, // Enables post transcription
    "summary": {
    "enabled": true, // Enables summary generation
    // Guides summary generation
    "prompt":
    "Write summary in sections like Title, Agenda, Speakers, Action Items, Outlines, Notes and Summary",
    }
    };

    room.startRecording(config: config, transcription: transcription);

stopRecording()

  • stopRecording() is used to stop the meeting recording which can be accessed from the Room object.

Example

import 'package:flutter/material.dart';
import 'package:videosdk/videosdk.dart';

class MeetingScreen extends StatefulWidget {
...
}

class _MeetingScreenState extends State<MeetingScreen> {
late Room _room;

@override
void initState() {
...
}

@override
Widget build(BuildContext context) {
return Column(
children:[
ElevatedButton(
onPressed:(){
Map<String, dynamic> config = {
"layout": {
"type": "GRID",
"priority": "SPEAKER",
"gridSize": 4,
},
"theme": "DARK",
"mode": "video-and-audio",
"quality": "high",
"orientation": "portrait",
};

Map<String, dynamic> transcription = {
"enabled": true,
"summary": {
"enabled": true,
"prompt":
"Write summary in sections like Title, Agenda, Speakers, Action Items, Outlines, Notes and Summary",
}
};
_room.startRecording(config: config, transcription: transcription);
},
child: const Text("Start Recording"),
),
ElevatedButton(
onPressed:(){
_room.stopRecording();
},
child: const Text("Stop recording"),
),
]
);
}
}

Event associated with Recording

  • recordingStateChanged - Whenever meeting recording state changes, then recordingStateChanged event will trigger.
import 'package:flutter/material.dart';
import 'package:videosdk/videosdk.dart';

class MeetingScreen extends StatefulWidget {
...
}

class _MeetingScreenState extends State<MeetingScreen> {
late Room room;

@override
void initState() {
...

setupRoomEventListener();
}

@override
Widget build(BuildContext context) {
return YourMeetingWidget();
}

void setupRoomEventListener() {
room.on(Events.recordingStateChanged, (String status) {
//Status can be :: RECORDING_STARTING
//Status can be :: RECORDING_STARTED
//Status can be :: RECORDING_STOPPING
//Status can be :: RECORDING_STOPPED
log("Meeting Recording status : $status");
});
}
}

Custom Template

With VideoSDK, you can also use your own custom designed layout template to record the meetings. In order to use the custom template, you need to create a template for which you can follow this guide. Once you have setup the template, you can use the REST API to start the recording with the templateURL parameter.

API Reference

The API references for all the methods utilized in this guide are provided below.

Got a Question? Ask us on discord