\content bytes

This commit is contained in:
jayesh
2024-04-12 18:47:26 +05:30
parent ad740f631c
commit 210b5d4eb4
8 changed files with 645 additions and 531 deletions

View File

@@ -27,14 +27,14 @@ class ContentBytesController extends GetxController {
final buttonNotifier = ValueNotifier<ButtonState>(ButtonState.paused);
late AudioPlayer _audioPlayer;
ContentBytesController() {
init(0);
}
void getAudio() => _audioPlayer;
void init(index) async {
_audioPlayer = AudioPlayer();
try {
await _audioPlayer.setUrl(contentBytesModel.data!.audio![index].file ??
await _audioPlayer.setUrl(
//contentBytesModel.data!.audio![index].file ??
'https://ghantalele.com/uploads/files/data-78/38825/Besharam%20Rang_192(Ghantalele.com).mp3');
// await _audioPlayer.setAsset(url);
} on PlayerException catch (e) {