Skip to content

Commit

Permalink
Update recommended way of setting image duration (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-vde authored Oct 7, 2024
1 parent ec31b95 commit 1e91431
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ class TransformerVideoComposition : Fragment() {

if (binding.imageChip.isChecked) {
val image = EditedMediaItem.Builder(
MediaItem.fromUri(URI_IMAGE),
// Show the image for 3 seconds in the composition
MediaItem.Builder().setUri(URI_IMAGE).setImageDurationMs(3_000).build(),
)
.setDurationUs(3_000_000) // Show the image for 3 seconds in the composition
.setFrameRate(30)
.build()

Expand Down

0 comments on commit 1e91431

Please sign in to comment.