JS Recorder

Introduction

This sample shows how to implement audio recording and playback by calling media-related APIs.

How to Use

  1. Start the sample app, and then touch the Record button at the bottom of the home screen to start recording. During the recording, you can touch the Pause button in the lower right corner to pause the recording, or touch the Stop button to stop the recording and return to the home screen. The recorded audio file is displayed on the home screen.

  2. Touch an audio file to play it. On the audio playback screen, you can touch the corresponding button to pause or resume the playback.

  3. Touch and hold an audio file, and then touch Rename or Delete to rename or delete the file, respectively.

Constraints

  1. This sample can only be run on standard-system devices.

  2. The DevEco Studio version used in this sample must be 3.0.0.900 or later.