Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7d8bee79
authored
Sep 30, 2019
by
tonihei
Committed by
Oliver Woodman
Oct 02, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add convenience Player.isCurrentWindowLive method.
PiperOrigin-RevId: 272005632
parent
dd4f9bca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
library/core/src/main/java/com/google/android/exoplayer2/BasePlayer.java
library/core/src/main/java/com/google/android/exoplayer2/Player.java
library/core/src/main/java/com/google/android/exoplayer2/BasePlayer.java
View file @
7d8bee79
...
...
@@ -128,6 +128,12 @@ public abstract class BasePlayer implements Player {
}
@Override
public
final
boolean
isCurrentWindowLive
()
{
Timeline
timeline
=
getCurrentTimeline
();
return
!
timeline
.
isEmpty
()
&&
timeline
.
getWindow
(
getCurrentWindowIndex
(),
window
).
isLive
;
}
@Override
public
final
boolean
isCurrentWindowSeekable
()
{
Timeline
timeline
=
getCurrentTimeline
();
return
!
timeline
.
isEmpty
()
&&
timeline
.
getWindow
(
getCurrentWindowIndex
(),
window
).
isSeekable
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/Player.java
View file @
7d8bee79
...
...
@@ -962,6 +962,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.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment