16e7c69efSopenharmony_ci# Distributed Music Player 26e7c69efSopenharmony_ci 36e7c69efSopenharmony_ci### Introduction 46e7c69efSopenharmony_ci 56e7c69efSopenharmony_ciIn this sample, **fileIo** is used to obtain an audio file; **AudioPlayer** is used to play music, pause the playback, and play the next or previous song; **DeviceManager** is used to display the distributed device list and hop music playback across devices. The display effect is as follows: 66e7c69efSopenharmony_ci 76e7c69efSopenharmony_ci<img src="screenshots/device/music2_en.png"/> 86e7c69efSopenharmony_ci 96e7c69efSopenharmony_ci### Concepts 106e7c69efSopenharmony_ci 116e7c69efSopenharmony_ciAudio playback: The media subsystem provides audio and video services and implements audio playback by using **AudioPlayer**. 126e7c69efSopenharmony_ci 136e7c69efSopenharmony_ciData hop: The distributed data management module implements collaboration between databases of different devices for applications. The APIs provided by distributed data management can be used to save data to the distributed database and perform operations such as adding, deleting, modifying, and querying data in the distributed database. 146e7c69efSopenharmony_ci 156e7c69efSopenharmony_ci### Required Permissions 166e7c69efSopenharmony_ci 176e7c69efSopenharmony_ciohos.permission.DISTRIBUTED_DATASYNC 186e7c69efSopenharmony_ci 196e7c69efSopenharmony_ci### Usage 206e7c69efSopenharmony_ci 216e7c69efSopenharmony_ci1. Play music. Touch the buttons on the music player to play music, pause the playback, and play the next or previous music clip. 226e7c69efSopenharmony_ci 236e7c69efSopenharmony_ci2. Play music across devices. On the Super Device formed by multiple networked devices, touch the **Hop** button and select a device to play the music on the peer device. 246e7c69efSopenharmony_ci 256e7c69efSopenharmony_ci### Constraints 266e7c69efSopenharmony_ci 276e7c69efSopenharmony_ci- This sample can only be run on standard-system devices. 286e7c69efSopenharmony_ci 296e7c69efSopenharmony_ci 306e7c69efSopenharmony_ci- This sample requires DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022) to compile and run. 316e7c69efSopenharmony_ci 326e7c69efSopenharmony_ci- If the app is set as a preset app, "error: install sign info inconsistent" will be displayed during the app installation. If this occurs, run the following commands to install the app and restart the device after the installation: 336e7c69efSopenharmony_ci 346e7c69efSopenharmony_ci **hdc shell mount -o rw,remount /** 356e7c69efSopenharmony_ci 366e7c69efSopenharmony_ci **hdc file send ./entry-default-signed.hap /system/app/com.ohos.distributedmusicplayer/Music_Demo.hap** 376e7c69efSopenharmony_ci 386e7c69efSopenharmony_ci **hdc shell reboot** 396e7c69efSopenharmony_ci 406e7c69efSopenharmony_ciAfter the device is restarted, the app is installed. No other operation is required. 41