# record_ohos **Repository Path**: flutter-assembly/record_ohos ## Basic Information - **Project Name**: record_ohos - **Description**: copy from https://gitee.com/openharmony-sig/fluttertpc_record/tree/master/record_ohos - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-04-27 - **Last Updated**: 2025-05-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # record Ohos Ohos specific implementation for record package called by record_platform_interface. ## Usage ```yaml dependencies: record: ^5.0.0 record_ohos: 1.0.0 ``` ## Usage ```dart import 'package:record/record_ohos.dart'; final record = AudioRecorder(); // Check and request permission if needed if (await record.hasPermission()) { // Start recording to file await record.start(const RecordConfig(), path: 'aFullPath/myFile.m4a'); // ... or to stream final stream = await record.startStream(const RecordConfig(AudioEncoder.pcm16bits)); } // Stop recording... final path = await record.stop(); // ... or cancel it (and implicitly remove file/blob). await record.cancel(); record.dispose(); // As always, don't forget this one. ```