flutter_screen_recording
画面の録画用の新しいFlutterプラグインです。このプラグインは、Android、iOS、およびWebデバイスで画面を録画するために使用できます。
画面を記録するための新しいFlutterプラグイン。
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
Flutter plugin to record the screen on Android, iOS, and web.
Current platform support in this repository:
minSdkVersion 23iOS 11.0+Import the package:
import 'package:flutter_screen_recording/flutter_screen_recording.dart';
Start screen recording:
final bool started = await FlutterScreenRecording.startRecordScreen(
'my_recording',
titleNotification: 'Screen recording',
messageNotification: 'Recording in progress',
);
Start screen recording with microphone audio:
final bool started = await FlutterScreenRecording.startRecordScreenAndAudio(
'my_recording',
titleNotification: 'Screen recording',
messageNotification: 'Recording in progress',
);
Stop recording and get the output path or file name:
final String path = await FlutterScreenRecording.stopRecordScreen;
The Android implementation uses MediaProjection, MediaRecorder, and a foreground service.
compileSdkVersion 35The example app requests permissions with permission_handler before starting recording.
The iOS implementation uses ReplayKit and requires iOS 11.0+.
Add the usage description for microphone access if you record audio:
<key>NSMicrophoneUsageDescription</key>
<string>Save audio in video</string>
The plugin returns the local output file path. If your app later saves the file to the Photos library, also add the appropriate Photos usage description to your app.
The web implementation uses getDisplayMedia and MediaRecorder.
video/mp4 recording support; WebM is used as a fallback.mp4 or .webm)await when starting and stopping recordings