mirror of
https://github.com/samsonjs/media.git
synced 2026-04-12 12:25:47 +00:00
Add convenience Player.isCurrentWindowLive method.
PiperOrigin-RevId: 272005632
This commit is contained in:
parent
dd4f9bcaae
commit
7d8bee799b
2 changed files with 13 additions and 0 deletions
|
|
@ -127,6 +127,12 @@ public abstract class BasePlayer implements Player {
|
|||
return !timeline.isEmpty() && timeline.getWindow(getCurrentWindowIndex(), window).isDynamic;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isCurrentWindowLive() {
|
||||
Timeline timeline = getCurrentTimeline();
|
||||
return !timeline.isEmpty() && timeline.getWindow(getCurrentWindowIndex(), window).isLive;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isCurrentWindowSeekable() {
|
||||
Timeline timeline = getCurrentTimeline();
|
||||
|
|
|
|||
|
|
@ -961,6 +961,13 @@ public interface Player {
|
|||
*/
|
||||
boolean isCurrentWindowDynamic();
|
||||
|
||||
/**
|
||||
* Returns whether the current window is live, or {@code false} if the {@link Timeline} is empty.
|
||||
*
|
||||
* @see Timeline.Window#isLive
|
||||
*/
|
||||
boolean isCurrentWindowLive();
|
||||
|
||||
/**
|
||||
* Returns whether the current window is seekable, or {@code false} if the {@link Timeline} is
|
||||
* empty.
|
||||
|
|
|
|||
Loading…
Reference in a new issue