diff --git a/README.en.md b/README.en.md index 2dda82189957b5a4ba97c2b1f2e923e0f63e426a..41e6f8b1caf5687e02adb52d8e6da5082024a853 100644 --- a/README.en.md +++ b/README.en.md @@ -1,70 +1,63 @@ -# Audio playback control and multi scene interaction based on AudioRenderer +# Audio Playback Control Based on AudioRenderer -#### Brief Introduction +#### Overview -This scenario solution is mainly aimed at front-end audio developers. Guide developers to develop audio playback control functions based on AudioRenderer. The functions include background playback, interaction with the broadcasting control center, adaptation to different types of focus interruption strategies, switching routing and sound devices, switching output devices and other basic audio common functions. +This sample demonstrates an audio app that implements audio playback control based on AudioRenderer. It provides the following features: background playback, interaction with the media controller, adaptation to different focus interruption policies, switching between routing sound devices, and switching between output devices. -#### Preview of renderings +#### Preview -| Main page | Lyrics page | -|--------------------------------------|---------------------------------------| -| ![](screenshots/device/MainPage.png) | ![](screenshots/device/LyricPage.png) | +| Home page | Lyrics page | +|-----------------------------------------|------------------------------------------| +| ![](screenshots/device/MainPage.en.png) | ![](screenshots/device/LyricPage.en.png) | -#### Main module structure of the project +#### Project Directory ``` ├──entry/src/main/ets/ │ ├──common -│ │ ├──constants // constants -│ │ └──utils // constants -│ ├──components // components -│ │ ├──ControlAreaComponent.ets // Audio control area component -│ │ ├──LyricsComponent.ets // Lyrics Component -│ │ ├──MusicInfoComponent.ets // Music Content Component -│ │ ├──PlayerInfoComponent.ets // Broadcast control content area component -│ │ └──TopAreaComponent.ets // Top Area Component -│ ├──dataSource // Source data +│ │ ├──constants // Constants +│ │ └──utils // Utils +│ ├──components // Module components +│ │ ├──ControlAreaComponent.ets // Components in the audio control area +│ │ ├──LyricsComponent.ets // Lyrics components +│ │ ├──MusicInfoComponent.ets // Music content components +│ │ ├──PlayerInfoComponent.ets // Components in the playback control content area +│ │ └──TopAreaComponent.ets // Top area components +│ ├──dataSource // Playlist data │ │ ├──SongDataSource.ets // Song data -│ │ └──SongListData.ets // Song List Data +│ │ └──SongListData.ets // Song list data │ ├──entryability -│ │ └──EntryAbility.ets // Ability's lifecycle callback content +│ │ └──EntryAbility.ets // Entry ability lifecycle callbacks │ ├──entrybackupability -│ │ └──EntryBackupAbility.ets // The lifecycle callback content of ExitBackupAbility -│ ├──lyric // Lyrics function -│ └──pages // pages +│ │ └──EntryBackupAbility.ets // EntryBackupAbility lifecycle callbacks +│ ├──lyric // Lyrics +│ └──pages // Pages ├──MediaService/src/main/ets -│ ├──songDataController // Song information data -│ │ ├──PlayerData.ets // Play data +│ ├──songDataController // Song information +│ │ ├──PlayerData.ets // Playback data │ │ ├──SongData.ets // Song source data │ │ └──SongItemBuilder.ets // Song combination data │ └──utils │ ├──AudioRendererController.ets // Audio playback control -│ ├──AVSessionController.ets // Media session control -│ ├──BackgroundUtil.ets // Backend playback function -│ ├──Logger.ets // Log function -│ ├──MediaTools.ets // Media data conversion tool class -│ └──PreferencesUtil.ets // Preferred storage function -└──entry/src/main/resources // Application static resource directory +│ ├──AVSessionController.ets // AVSession control +│ ├──BackgroundUtil.ets // Background playback +│ ├──Logger.ets // Log utility +│ ├──MediaTools.ets // Media data conversion utility class +│ └──PreferencesUtil.ets // Preferences storage +└──entry/src/main/resources // Static resources ``` -#### Related permissions - -1. Background task permissions:ohos.permission.KEEP_BACKGROUND_RUNNING。 - -#### Rely on - -Not involved - -#### Constraints and limitations - -1. This example only supports running on standard systems and supports devices such as Huawei phones. -2. HarmonyOS system: HarmonyOS Beta 1 or above. -3. DevEco Studio version: DevEco Studio NEXT Beta 1 and above. -4. HarmonyOS SDK version: HarmonyOS NEXT Beta1 SDK and above. - - +#### Required Permissions +**ohos.permission.KEEP_BACKGROUND_RUNNING**: allows an app to run in the background. +#### Dependencies +N/A +#### Constraints +1. The sample app is supported only on Huawei phones running the standard system. +2. The HarmonyOS version must be HarmonyOS NEXT Beta1 or later. +3. The DevEco Studio version must be DevEco Studio NEXT Beta1 or later. +4. The HarmonyOS SDK version must be HarmonyOS NEXT Beta1 or later. diff --git a/screenshots/device/LyricPage.en.png b/screenshots/device/LyricPage.en.png new file mode 100644 index 0000000000000000000000000000000000000000..d819f14435eb81c8215466df1f8c45c39aa3dbcb Binary files /dev/null and b/screenshots/device/LyricPage.en.png differ diff --git a/screenshots/device/MainPage.en.png b/screenshots/device/MainPage.en.png new file mode 100644 index 0000000000000000000000000000000000000000..63aecb0b5a1ad0db28733fbe39ed0c092be8f182 Binary files /dev/null and b/screenshots/device/MainPage.en.png differ