mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Merge branch 'dev-v2_subtitles_view' of git://github.com/drhill/ExoPlayer into drhill-dev-v2_subtitles_view
This commit is contained in:
commit
a7736e101f
@ -472,6 +472,16 @@ public final class SimpleExoPlayerView extends FrameLayout {
|
||||
return overlayFrameLayout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the {@link SubtitleView}.
|
||||
*
|
||||
* @return The {@link SubtitleView}, or {@code null} if the layout has been customized and the
|
||||
* subtitle view is not present.
|
||||
*/
|
||||
public SubtitleView getSubtitleView() {
|
||||
return subtitleView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent ev) {
|
||||
if (!useController || player == null || ev.getActionMasked() != MotionEvent.ACTION_DOWN) {
|
||||
@ -494,6 +504,11 @@ public final class SimpleExoPlayerView extends FrameLayout {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
return useController ? controller.dispatchKeyEvent(event) : super.dispatchKeyEvent(event);
|
||||
}
|
||||
|
||||
private void maybeShowController(boolean isForced) {
|
||||
if (!useController || player == null) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user