@libs-ui/components-audio 0.2.355-14 → 0.2.355-15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -17
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -46,9 +46,8 @@ import { LibsUiComponentsAudioComponent, IAudioFunctionControlEvent } from '@lib
|
|
|
46
46
|
(outVolumeControl)="onVolumeChange($event)"
|
|
47
47
|
(outTimeUpdate)="onTimeUpdate($event)"
|
|
48
48
|
(outMute)="onMuteChange($event)"
|
|
49
|
-
(outEnded)="onEnded()">
|
|
50
|
-
|
|
51
|
-
`
|
|
49
|
+
(outEnded)="onEnded()"></libs_ui-components-audio>
|
|
50
|
+
`,
|
|
52
51
|
})
|
|
53
52
|
export class ExampleComponent {
|
|
54
53
|
audioUrl = 'https://example.com/audio.mp3';
|
|
@@ -111,21 +110,21 @@ const isMuted = this.controls.isMuted();
|
|
|
111
110
|
|
|
112
111
|
### Inputs
|
|
113
112
|
|
|
114
|
-
| Tên
|
|
115
|
-
|
|
116
|
-
| `fileAudio`
|
|
117
|
-
| `checkPermissionDownloadAudio` | `() => Promise<boolean>` |
|
|
113
|
+
| Tên | Kiểu | Mặc định | Mô tả |
|
|
114
|
+
| ------------------------------ | ------------------------ | ---------- | --------------------------------------------------------------------- |
|
|
115
|
+
| `fileAudio` | `string` | _required_ | URL của file audio cần phát. Hỗ trợ MP3, WAV, OGG. |
|
|
116
|
+
| `checkPermissionDownloadAudio` | `() => Promise<boolean>` | _required_ | Callback kiểm tra quyền download. Trả về Promise với kết quả boolean. |
|
|
118
117
|
|
|
119
118
|
### Outputs
|
|
120
119
|
|
|
121
|
-
| Tên
|
|
122
|
-
|
|
123
|
-
| `outFunctionsControl` | `IAudioFunctionControlEvent`
|
|
124
|
-
| `outVolumeControl`
|
|
125
|
-
| `outTimeUpdate`
|
|
126
|
-
| `outEnded`
|
|
127
|
-
| `outMute`
|
|
128
|
-
| `outPlay`
|
|
120
|
+
| Tên | Kiểu | Mô tả |
|
|
121
|
+
| --------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
122
|
+
| `outFunctionsControl` | `IAudioFunctionControlEvent` | Emit object chứa các hàm điều khiển: playPause, toggleMute, seekTo, setVolume, download, isPlaying, isMuted. |
|
|
123
|
+
| `outVolumeControl` | `number` | Emit giá trị âm lượng hiện tại từ 0-100. |
|
|
124
|
+
| `outTimeUpdate` | `{ currentTime: string, duration: string }` | Emit thông tin thời gian theo định dạng HH:MM:SS. |
|
|
125
|
+
| `outEnded` | `void` | Emit khi audio phát xong. |
|
|
126
|
+
| `outMute` | `boolean` | Emit trạng thái tắt/bật tiếng. |
|
|
127
|
+
| `outPlay` | `boolean` | Emit trạng thái đang phát/tạm dừng. |
|
|
129
128
|
|
|
130
129
|
### Interface: IAudioFunctionControlEvent
|
|
131
130
|
|
|
@@ -185,7 +184,7 @@ npx nx serve core-ui
|
|
|
185
184
|
|
|
186
185
|
**File demo:** `apps/core-ui/src/app/components/audio/audio.component.ts`
|
|
187
186
|
|
|
188
|
-
Truy cập: `http://localhost:
|
|
187
|
+
Truy cập: `http://localhost:4500/audio`
|
|
189
188
|
|
|
190
189
|
### Tính năng Demo
|
|
191
190
|
|
|
@@ -209,4 +208,3 @@ npx nx test components-audio --watch
|
|
|
209
208
|
## License
|
|
210
209
|
|
|
211
210
|
MIT
|
|
212
|
-
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libs-ui/components-audio",
|
|
3
|
-
"version": "0.2.355-
|
|
3
|
+
"version": "0.2.355-15",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/core": ">=18.0.0",
|
|
6
|
-
"@libs-ui/components-inputs-range-slider": "0.2.355-
|
|
6
|
+
"@libs-ui/components-inputs-range-slider": "0.2.355-15",
|
|
7
7
|
"rxjs": "~7.8.0"
|
|
8
8
|
},
|
|
9
9
|
"sideEffects": false,
|