Description
A component that can play network or local music.
Property
Component property name | Property description |
---|---|
Specifies whether to synchronize. Once this is selected, players will get the same music with the same playback progress. Otherwise, the music will only be played locally. | |
The music list stored in the component. The list type can be either local AudioClip or network music. You can preset music in the list when you create a scene, or you can add new music and delete existing music through APIs at runtime. | |
The index of the currently playing music. | |
The playback order of the music list. The default value is eMusicPlay_listLoop. | |
Gets the volume of the current music. You can get this value, but you cannot assign a new one. | |
Gets the playback time of the current music. You can get this value, but you cannot assign a new one. | |
Gets whether the current music is interrupted. You can get this value, but you cannot assign a new one. | |
Gets whether the current music is playing. You can get this value, but you cannot assign a new one. | |
Gets whether the current music is muted. You can get this value, but you cannot assign a new one. |
Public method
Sets the music volume. | |
Mutes. | |
Unmutes. | |
Pauses music. | |
Stops music. | |
Gets the error code of the current music. | |
Plays music at the specified time. | |
Plays music. | |
Sets the currently playing music. | |
Previous song | |
Next song | |
Adds a new network music file. | |
Removes a piece of music. |