648 Commits

Author SHA1 Message Date
bachinger
cdff456621 Make copybara remove the LINT.IfChange tag
PiperOrigin-RevId: 371135534
2021-04-29 17:35:05 +01:00
ibaker
dafea4e40f Re-format some javadoc
PiperOrigin-RevId: 369642047
2021-04-21 18:46:00 +01:00
olly
2e5a616f26 Core/UI decoupling: Move spherical back to core
A subsequent change will make the UI module access
SphericalGLSurfaceView and VideoDecoderGLSurfaceView
using reflection, now we're at the point where we only
need to reflect the constructors.

PiperOrigin-RevId: 369630102
2021-04-21 18:45:24 +01:00
olly
a78b18298b Remove some long deprecated methods
PiperOrigin-RevId: 369626542
2021-04-21 18:45:06 +01:00
krocard
08336e372d Rollforward of Move VideoComponent to ExoPlayer
The original cl has been fixed by not implementing
VideoListener but Player.Listener in
StyledPlayerView.

VideoFrameMetadataListener and CameraMotionListener are still part
of the Player interface as a good way to break the UI dependency
on them has not yet been finalised.

PiperOrigin-RevId: 369417682
2021-04-20 14:02:48 +01:00
krocard
f201b617d7 Fix broken subtitles in StyledPlayerView
PlayerView is not affected.

PiperOrigin-RevId: 369401563
2021-04-20 14:02:33 +01:00
ibaker
6550ea88ea Rollback of cdebf6c68b
*** Original commit ***

Move VideoComponent in ExoPlayer

VideoFrameMetadataListener and CameraMotionListener are still part
of the Player interface as a good way to break the UI dependency
on them has not yet been finalised.

***

PiperOrigin-RevId: 369194309
2021-04-20 00:09:45 +01:00
krocard
cdebf6c68b Move VideoComponent in ExoPlayer
VideoFrameMetadataListener and CameraMotionListener are still part
of the Player interface as a good way to break the UI dependency
on them has not yet been finalised.

PiperOrigin-RevId: 368863829
2021-04-20 00:08:08 +01:00
olly
33f3e5fca0 Make surfaceView non-clickable
PiperOrigin-RevId: 368818853
2021-04-16 14:13:30 +01:00
Oliver Woodman
5511bb66d8 Merge pull request #8814 from dlafayet:line-height
PiperOrigin-RevId: 368803206
2021-04-16 14:12:46 +01:00
olly
d7c7161002 Core/UI decoupling: Replace SingleTapListener with OnClickListener
PiperOrigin-RevId: 368448442
2021-04-15 10:52:46 +01:00
krocard
5ae84ab5f4 Move TextComponent to ExoPlayer
PiperOrigin-RevId: 368428647
2021-04-15 10:52:24 +01:00
olly
bd654279d7 Core/UI decoupling: Remove SphericalGLSurfaceView cast
PiperOrigin-RevId: 368420961
2021-04-15 10:52:12 +01:00
Denise LaFayette
69f80d9be9 Fix bottom-cropped text in WebView output
Use unitless numbers for WebView line-height values

See
https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#prefer_unitless_numbers_for_line-height_values
2021-04-13 12:43:47 -07:00
olly
ffc2a47d0a Pause and resume GLSurfaceView instances in player views
This is the right thing to do, as per the GLSurfaceView documentation.
This adds (previously omitted) calls to VideoDecoderGLSurfaceView.

PiperOrigin-RevId: 368202523
2021-04-13 14:59:17 +01:00
olly
72c77875e4 Core/UI decoupling: Remove setUseSensorRotation from views
Other properties of SphericalGLSurfaceView (e.g., setDefaultStereoMode)
are not plumbed through the PlayerView components, and it doesn't scale
to plumb through all properties of all of the SurfaceView types.

Applications can instead do:

```
((SphericalGLSurfaceView) playerView.getVideoSurfaceView())
    .setUseSensorRotation(useSensorRotation);
```

PiperOrigin-RevId: 368196537
2021-04-13 14:59:07 +01:00
gyumin
253c8ce2ad Fix errors when generating javadoc
PiperOrigin-RevId: 367596648
2021-04-09 13:19:29 +01:00
olly
199b9d1689 Convergence: Continue decoupling UI from Core
Move AdsLoader inner classes that are also required by
the UI module into common.

PiperOrigin-RevId: 367414679
2021-04-09 13:19:07 +01:00
olly
53166e9a78 Package VideoDecoderGLSurfaceView a little more nicely
The main change here is that VideoDecoderGLSurfaceView now implements
VideoDecoderOutputBufferRenderer directly. This avoids SimpleExoPlayer
having to cast to VideoDecoderGLSurfaceView, which will be necessary
if VideoDecoderGLSurfaceView is moved to the UI module. Instead, the
player can cast directly to VideoDecoderOutputBufferRenderer, which
could be moved to the Common module.

The renderer is also moved to be an inner class, since it's not used
anywhere else and since doing this makes it a little easier to move
things around.

PiperOrigin-RevId: 367398147
2021-04-09 13:18:59 +01:00
olly
d853379b8b Convergence: Continue decoupling UI from Core
Move CaptionStyleCompat to the UI module, where it's used

PiperOrigin-RevId: 367223891
2021-04-09 13:18:30 +01:00
olly
30ddaec5a4 StyledPlayerView: Fix layout issues
- Take centerControls padding into account to prevent switching to
  minimal mode too soon
- Disable clipping to padding to avoid the edges of controls from
  being clipped as the view gets smaller

Issue: #8763
PiperOrigin-RevId: 366966298
2021-04-06 16:14:46 +01:00
Oliver Woodman
6603c6bbcf Merge pull request #8720 from dlafayet:tts-shear-block
PiperOrigin-RevId: 365998615
2021-04-01 16:05:00 +01:00
ibaker
dd3597c2c1 Document that the order of cues passed to TextOutput is important
Fix WebViewSubtitleOutput to respect this (CanvasSubtitleOutput already
does).

Issue: #8704
PiperOrigin-RevId: 365534018
2021-04-01 16:03:35 +01:00
Denise LaFayette
475b1fe3de Address code review comments 2021-03-25 11:59:28 -07:00
olly
2b0995635e StyledPlayerControlView: Fix view measurement issue
The exo_controls_background view is supposed to fill its parent,
and so previously used match_parent to do this. However, if the
parent uses wrap_content for its own dimensions, the constraints
being specified become somewhat ambiguous. The parent is supposed
to be sizing itself to wrap its children, and one of the children
is supposed to be sizing itself to match the parent.

Intuitively for this case, you'd hope that the layout logic would
size the parent to wrap its other children, and that the
match_parent child would then fill the parent with its determined
size. That's not what happens, and instead the parent ends up
expanding to occupy all of the space available to it.

This commit sets the exo_controls_background view's dimensions
to be 0dp in the layout, to stop it from influencing the size of
the parent. It's then expanded to fill the parent in code.

Issue: #8726
#minor-release
PiperOrigin-RevId: 364868301
2021-03-24 19:56:34 +00:00
bachinger
dc4148d576 Add positions and new reasons to onPositionDiscontinuity
PiperOrigin-RevId: 364861539
2021-03-24 19:56:25 +00:00
Denise LaFayette
4be774aaac Support tts:shear in TTML parser and WebView output 2021-03-24 12:39:44 -07:00
Ian Baker
6c688891e3 Merge pull request #8653 from dlafayet:textemphasis
PiperOrigin-RevId: 364363882
2021-03-24 18:05:46 +00:00
andrewlewis
66c9964be8 Fix typo in styled player control view javadoc
#minor-release

PiperOrigin-RevId: 363915106
2021-03-24 18:05:16 +00:00
kimvde
6c9f9f9def Add available command to seek in current item
PiperOrigin-RevId: 362972550
2021-03-15 19:15:19 +00:00
kimvde
851c915e38 Add COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM to available commands
PiperOrigin-RevId: 362036291
2021-03-12 10:41:51 +00:00
Denise LaFayette
0f0e0c974b Fix missing background color behind emphasis mark
Add more comments and tests for TextEmphasis
2021-03-09 14:01:32 -08:00
Denise LaFayette
f7f40bcb25 Address code review comments
- Split text emphasis mark and style into two IntDefs
- Represent textEmphasis="none" with a span rather than null
- Fixed bugs in the style parsing logic
2021-03-05 12:23:34 -08:00
Denise LaFayette
4ad6454713 Address code review comments
- Refactor TextEmphasis class to support different ordering of styles
- Merge RubySpan.Position and TextEmphasisSpan.Position
- Remove TTML constructs from Spanned classes
2021-03-04 15:49:28 -08:00
Oliver Woodman
6be3a59354 Merge pull request #8546 from TadejZupancic:dev-v2
PiperOrigin-RevId: 360433358
2021-03-02 17:04:56 +00:00
olly
70f831a647 Simplify handling of playback speed in StyledPlayerControlView
PiperOrigin-RevId: 360404403
2021-03-02 17:04:44 +00:00
olly
b5d360c4cd Fix scrubber not reappearing correctly in some cases
Issue: #8646
#minor-release
PiperOrigin-RevId: 360184586
2021-03-02 17:04:04 +00:00
Denise LaFayette
fcda8d47ff Support tts:textEmphasis in TTML parser and WebView output 2021-03-01 14:21:22 -08:00
TadejZupancic
50a11886b6 The popup window now opens above or below the button which caused it to open. 2021-02-25 19:35:00 +01:00
olly
15c3c44e64 Add group setting for the notification
PiperOrigin-RevId: 359298960
2021-02-25 09:18:40 +00:00
krocard
589f50fb22 Move renderer from Player to ExoPlayer
The concept of Renderers is not needed in the
Player interface. Move it to ExoPlayer.

This should not break most users as they use SimpleExoPlayer.

PiperOrigin-RevId: 359220977
2021-02-24 15:46:35 +00:00
kimvde
32e3f15e8f Fix conditions to enable UI actions
- Ensure consistency between (Styled)PlayerControlView,
  PlayerNotificationManager, TimelineQueueNavigator and
  DefaultControlDispatcher.
- Handle the case where a live stream has ended when enabling previous
  and next actions (window.isLive() is true and window.isDynamic is
  false in that case)

#minor-release

PiperOrigin-RevId: 359063793
2021-02-24 15:46:11 +00:00
marcbaechinger
95fcfdd71d Merge pull request #8539 from larryng:patch-1
PiperOrigin-RevId: 359000734
2021-02-23 12:30:31 +00:00
olly
1b6dd40aa5 Move Spherical UI components to the UI module
PiperOrigin-RevId: 357549002
2021-02-19 10:55:46 +00:00
kimvde
842ca9c09f Add method to query whether a command is available
- Other commands will be added later.
- The returned value is a boolean until we decide what it should be.

PiperOrigin-RevId: 357535877
2021-02-19 10:55:20 +00:00
kimvde
6afb669aa7 Enable next button if window is live
This behavior is consistent with DefaultControlDispatcher#dispatchNext().

#minor-release

PiperOrigin-RevId: 357145076
2021-02-12 16:40:14 +00:00
olly
0dba806894 Move DebugTextViewHelper to core
It's closely tied to SimpleExoPlayer, so cannot be part of a UI module
that depends only on common.

PiperOrigin-RevId: 357085802
2021-02-12 16:40:05 +00:00
olly
30ad70bbd7 Remove deprecated DownloadNotificationUtil
PiperOrigin-RevId: 356474350
2021-02-09 13:59:57 +00:00
Larry Ng
bbcbe65f08 Add missing resource ids from StyledPlayerControlView 2021-02-03 12:52:49 -05:00
bachinger
63ae8f5417 Add PlayerNotificationManager.Builder
PiperOrigin-RevId: 355356169
2021-02-03 15:02:59 +00:00