Player behaviors
Auto play
This auto play flag causes a video to play when it becomes visible on the screen. If there are multiple visible videos, the first video will be played. The default value is true.
val playerCf = PlayerItemConfiguration().apply {
enableAutoPlay()
//
disableAutoPlay()
}
Player complete action
You can control the behavior when the player finishes playback.
val playerCf = PlayerItemConfiguration().apply {
actionOnCompleted = PlayerCompleteAction.STOP
}
Supported Actions:
Action | Description |
---|---|
STOP | The player will always stop the video after playing it. |
REPEAT | The player will always loop the current video. |
PLAY_NEXT_ITEM | The player will always play the next video in the list after playing the current video. If the current video is the last item, the player will stop playing. This is the default value. |
PLAY_NEXT_ITEM_AND_LOOP | The player will always play the next video in the list after playing the current video. If the current video is the last item, the player will play the first item in the list. This behavior is same as the Loop from start setting at the CMS. |