mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 15:36:38 +01:00
Starts video with the audio on/off based on global mute variable
This commit is contained in:
@@ -138,7 +138,7 @@ fun VideoView(videoUri: Uri, description: String? = null, thumb: Drawable? = nul
|
|||||||
ExoPlayer.Builder(context).build().apply {
|
ExoPlayer.Builder(context).build().apply {
|
||||||
repeatMode = Player.REPEAT_MODE_ALL
|
repeatMode = Player.REPEAT_MODE_ALL
|
||||||
videoScalingMode = C.VIDEO_SCALING_MODE_SCALE_TO_FIT
|
videoScalingMode = C.VIDEO_SCALING_MODE_SCALE_TO_FIT
|
||||||
volume = 0f
|
volume = if (mutedInstance.value) 0f else 1f
|
||||||
if (videoUri.scheme?.startsWith("file") == true) {
|
if (videoUri.scheme?.startsWith("file") == true) {
|
||||||
setMediaItem(media)
|
setMediaItem(media)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user