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
edd237e1
authored
May 14, 2018
by
Pedro Machado
Committed by
Pedro Machado
May 14, 2018
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Saving current subtitle cues on SimpleExoPlayer
parent
9adf9542
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
View file @
edd237e1
...
...
@@ -92,6 +92,7 @@ public class SimpleExoPlayer implements ExoPlayer, Player.VideoComponent, Player
private
AudioAttributes
audioAttributes
;
private
float
audioVolume
;
private
MediaSource
mediaSource
;
private
List
<
Cue
>
currentCues
;
/**
* @param renderersFactory A factory for creating {@link Renderer}s to be used by the instance.
...
...
@@ -502,6 +503,7 @@ public class SimpleExoPlayer implements ExoPlayer, Player.VideoComponent, Player
@Override
public
void
addTextOutput
(
TextOutput
listener
)
{
listener
.
onCues
(
currentCues
);
textOutputs
.
add
(
listener
);
}
...
...
@@ -775,6 +777,7 @@ public class SimpleExoPlayer implements ExoPlayer, Player.VideoComponent, Player
mediaSource
=
null
;
analyticsCollector
.
resetForNewMediaSource
();
}
currentCues
=
null
;
}
@Override
...
...
@@ -790,6 +793,7 @@ public class SimpleExoPlayer implements ExoPlayer, Player.VideoComponent, Player
if
(
mediaSource
!=
null
)
{
mediaSource
.
removeEventListener
(
analyticsCollector
);
}
currentCues
=
null
;
}
@Override
...
...
@@ -1095,6 +1099,7 @@ public class SimpleExoPlayer implements ExoPlayer, Player.VideoComponent, Player
@Override
public
void
onCues
(
List
<
Cue
>
cues
)
{
currentCues
=
cues
;
for
(
TextOutput
textOutput
:
textOutputs
)
{
textOutput
.
onCues
(
cues
);
}
...
...
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