ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Question: how to switch on/off live edge in exoplayer v2

Open jiafei1986 opened this issue 9 years ago • 1 comments

I am doing a video app, There is a live stream for dash, and there is an option let the user watch live video or start over. for example, there is a match, the user can watch live or from the beginning. in the exoplayer v1, there is parameter 'startAtLiveEdge' in class DashRendererBuilder that i can set. where can i set in exoplayer v2?

Thanks in advance!

jiafei1986 avatar Jul 13 '17 06:07 jiafei1986

The player will default to the live edge, so I think you're only concerned with the case where the user wants to watch from the beginning. It should work to simply call player.seekTo(0) before preparing the player. Similarly, player.seekToDefaultPosition() will seek to the live edge. Both can be used before and during playback.

ojw28 avatar Jul 13 '17 13:07 ojw28