Чат, вложения
This commit is contained in:
@@ -29,6 +29,7 @@ import androidx.media3.common.PlaybackParameters
|
||||
import androidx.media3.common.Player
|
||||
import androidx.media3.exoplayer.ExoPlayer
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@Composable
|
||||
fun AppAudioPlayer(
|
||||
@@ -43,6 +44,7 @@ fun AppAudioPlayer(
|
||||
contentColor: Color = Color.White
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
val scope = rememberCoroutineScope()
|
||||
var playbackSpeed by remember { mutableFloatStateOf(initialPlaybackSpeed) }
|
||||
|
||||
// Update global speed when changed locally
|
||||
@@ -259,7 +261,11 @@ fun AppAudioPlayer(
|
||||
imageVector = Icons.Default.Download,
|
||||
contentDescription = null,
|
||||
tint = contentColor.copy(alpha = 0.6f),
|
||||
modifier = Modifier.size(14.dp).clickable { /* Handle download */ }
|
||||
modifier = Modifier.size(14.dp).clickable {
|
||||
scope.launch {
|
||||
core.utils.DownloadUtils.downloadMedia(context, url, fileName)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user