New Player View Model
The NewPlayerViewModel must live and be owned by an Activity context.
Properties
Depicts weather the picture of the video should be stretched, fit inside or be cropped. You can set it yourself, but NewPlayerUI can also change it.
If the user dragged down the embedded video or audio player. This callback will tell you how far the user dragged down. Keep in mind that the user can also decide to drag the NewPlayerUI up again. If the NewPlayerUI is not dragged up to its original position you should take over control and maybe make the NewPlayerUI snap to the bottom of the screen to make space for your UI.
NewPlayerUI will use some back press events for its own navigation purposes. If the viewModel decides that a back press event should not be handled by itself. It will forward the event to you through this callback.
This represents the state the UI is in. NewPlayerUI will basically render out that state. You can make your UI also listen to changes to this state. This is especially helpful for switching to or from fullscreen or to or from PiP mode.
Functions
This is something you have to call in the Activity that should host the NewPlayerUI. See the example app's main activity to find out how to use this.