mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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;
|
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
|
@Override
|
||||||
public final boolean isCurrentWindowSeekable() {
|
public final boolean isCurrentWindowSeekable() {
|
||||||
Timeline timeline = getCurrentTimeline();
|
Timeline timeline = getCurrentTimeline();
|
||||||
|
|
|
||||||
|
|
@ -961,6 +961,13 @@ public interface Player {
|
||||||
*/
|
*/
|
||||||
boolean isCurrentWindowDynamic();
|
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
|
* Returns whether the current window is seekable, or {@code false} if the {@link Timeline} is
|
||||||
* empty.
|
* empty.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue