title: How to implement go live option in exoplayer
body: <p>I am trying to implement a go live option when playing a video through exoplayer. To explain what I mean by 'Go Live' I'll give an example.</p>
  <ol>
  <li>User plays a live video on the exoplayer.</li>
  <li>User clicks pause on the player.</li>
  <li>A 'Go Live' Button should appear letting user shift to latest point in the stream.</li>
  </ol>
  <p>I see similar functionality on youtube and wanted to implement the same in my app. I see there are <code>getTotalBufferedDuration()</code> and similar methods related to buffer lenght and size. But having a thread running and looking at this value and displaying the 'Go Live' option looks like a bad implementation. So if anyone can suggest on a approach.</p>
  <p>My current implementation is to provide a 'Go Live' text on the player for user to manually seek to latest player offset</p>
  <pre><code>TextView go_live = view.findViewById(R.id.go_live);
  go_live.setOnClickListener(v -&gt; {
      player.seekToDefaultPosition();
    });
  </code></pre>