VideoPlayer

fun VideoPlayer(@RawRes videoRes: Int, playWhenReady: Boolean = true, loop: Boolean = false, showControls: Boolean = true, height: Int = 720, modifier: Modifier = Modifier)

Creates an ExoPlayer composable that plays a video with a Resource Index videoRes.

This was made to the app's goal of playing videos offline, as tradeshows don't necessarily have reliable internet access. The current implementation of this method allows the playing of videos that use .mp4 or .mov extensions (technically, it's any extension with three word characters).

There is a bug where a video that is too high quality bitrate causes the video player to crash the app. I'm not sure why this is, but using a lower bitrate seems to help with app reliability. I recommend using Cobalt to download videos from the web and convert them into a file that can be used in the app.

Parameters

videoRes

The RawRes resource of the video file to be played.

playWhenReady

Should the video play immediately when it's ready?

loop

Should the video loop indefinitely?

showControls

Should controls be available to the user?

height

The height of the video player

modifier

The Modifier to be applied to this component