Component Feature
Components for playing audio, offering simple playback control, support different size configurations.
Basic Usage
Specify the audio resource via src and control the player size.
Template example:
<Audio src="https://www.w3schools.com/html/horse.mp3" size="md" />
Effect display as follows:
Attribute Description
|
src ★ | string
| Audio resource URL | - |
size | "sm" | "md" | "lg"
| player size | "md"
|
Note:
★ Marked with required attribute.
Player Feature
The audio player provides the following features by default:
Playback/suspension control.
Volume control.
Progress bar display and drag and drop.
Playback time display.
Adjust playback speed.
Size Description
|
sm | 260px | sidebar, profile card |
md | 320px | General content area |
lg | 480px | main content area |
Default Value | 100% | Self adaptive container width (minimum 260px, maximum 100%) |