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
8804ecde
authored
Dec 21, 2016
by
drhill
Committed by
GitHub
Dec 21, 2016
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
remove unneeded changes
parent
44b21f2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
20 deletions
library/src/main/java/com/google/android/exoplayer2/ui/SimpleExoPlayerView.java
library/src/main/java/com/google/android/exoplayer2/ui/SimpleExoPlayerView.java
View file @
8804ecde
...
...
@@ -178,7 +178,6 @@ public final class SimpleExoPlayerView extends FrameLayout {
private
SimpleExoPlayer
player
;
private
boolean
useController
;
private
boolean
useArtwork
;
private
boolean
subtitlesEnabled
=
false
;
private
int
controllerShowTimeoutMs
;
public
SimpleExoPlayerView
(
Context
context
)
{
...
...
@@ -524,26 +523,14 @@ public final class SimpleExoPlayerView extends FrameLayout {
return
;
}
TrackSelectionArray
selections
=
player
.
getCurrentTrackSelections
();
boolean
quickExit
=
false
;
for
(
int
i
=
0
;
i
<
selections
.
length
;
i
++)
{
switch
(
player
.
getRendererType
(
i
))
{
case
C
.
TRACK_TYPE_VIDEO
:
if
(
selections
.
get
(
i
)
!=
null
)
{
// Video enabled so artwork must be hidden. If the shutter is closed, it will be opened in
// onRenderedFirstFrame().
hideArtwork
();
quickExit
=
true
;
}
break
;
case
C
.
TRACK_TYPE_TEXT
:
if
(
selections
.
get
(
i
)
!=
null
)
subtitlesEnabled
=
true
;
break
;
if
(
player
.
getRendererType
(
i
)
==
C
.
TRACK_TYPE_VIDEO
&&
selections
.
get
(
i
)
!=
null
)
{
// Video enabled so artwork must be hidden. If the shutter is closed, it will be opened in
// onRenderedFirstFrame().
hideArtwork
();
return
;
}
}
if
(
quickExit
)
return
;
// Video disabled so the shutter must be closed.
if
(
shutterView
!=
null
)
{
shutterView
.
setVisibility
(
VISIBLE
);
...
...
@@ -614,7 +601,6 @@ public final class SimpleExoPlayerView extends FrameLayout {
@Override
public
void
onCues
(
List
<
Cue
>
cues
)
{
if
(
subtitleView
!=
null
)
{
subtitleView
.
onCues
(
cues
);
}
...
...
@@ -625,7 +611,6 @@ public final class SimpleExoPlayerView extends FrameLayout {
@Override
public
void
onVideoSizeChanged
(
int
width
,
int
height
,
int
unappliedRotationDegrees
,
float
pixelWidthHeightRatio
)
{
if
(
contentFrame
!=
null
)
{
float
aspectRatio
=
height
==
0
?
1
:
(
width
*
pixelWidthHeightRatio
)
/
height
;
contentFrame
.
setAspectRatio
(
aspectRatio
);
...
...
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