649 Commits

Author SHA1 Message Date
olly
9df2e42d4d Fix expansion of items within StyledPlayerView popup
Issue: #9086
#minor-release
PiperOrigin-RevId: 380756562
2021-06-22 10:17:28 +01:00
olly
b1dda6a02a Fix DefaultTimeBar glitches
The glitches were introduced in:
https://github.com/google/ExoPlayer/commit/6c31e34528

The problem is that Listener.onEvents is called in a later looper iteration
than the listener methods that were previously used. This created a gap on
the main thread between the UI component dispatching a seek operation to the
player, and onEvents being called to update the progress bar's position.

At the start of this gap the progress bar is rendering the new position,
but its position member variable is still set to the old position. If the
progress bar is re-drawn by another message on the main thread within the
gap, it will briefly show the old position until onEvents is called.

There are multiple possible fixes to this, and the best one is probably to
modify ListenerSet to remove the gap. That's high risk though, so for now we
fix the flicker by always updating the progress immediately after the seek
is dispatched, in addition to when onEvents is called.

Issue: #9049
#minor-release
PiperOrigin-RevId: 380678388
2021-06-21 23:52:43 +01:00
olly
3d3ac623a6 Specify a root when inflating child views
#minor-release

PiperOrigin-RevId: 380655806
2021-06-21 22:31:52 +01:00
olly
6f686be751 Workaround for focus issues on API levels less than 26
Issue: #9061
PiperOrigin-RevId: 380640601
2021-06-21 22:30:38 +01:00
olly
63f12f0216 Remove obsolete Checker Framework suppression strings
More information: go/checker-3130-lsc

Tested:
    TAP for global presubmit queue passed after automated deflaking of failures: http://mondo/deflaker/run/ff80a4f9-d5d7-47ac-9560-63372e1ff624 http://mondo/deflaker/run/ca3ce61f-2af8-4fa7-b6e4-c98b5c4d950c
    http://test/OCL:379405669:BASE:379421861:1623763190392:bd2d256a
PiperOrigin-RevId: 379623080
2021-06-21 21:57:56 +01:00
olly
3e819d082a Make javadoc valid html5
As of [JDK-8247957](https://bugs.openjdk.java.net/browse/JDK-8247957), doclint
no longer supports html4.

Tested:
    Some test failures are present, but the CL author has decided to mail the change anyway
PiperOrigin-RevId: 378819179
2021-06-11 12:23:35 +01:00
olly
628ebeeb2b Update @SuppressWarnings annotations for go/nullness diagnostics
in preparation for upgrading the version of the Checker Framework in google3.

More information: go/checker-3110-lsc

PiperOrigin-RevId: 378184078
2021-06-09 00:09:16 +01:00
aquilescanta
4e85184955 Make PlayerView depend on PlaybackException
PiperOrigin-RevId: 377542206
2021-06-08 12:59:38 +01:00
aquilescanta
536f7c8dbe Make StyledPlayerView depend on PlaybackException
PiperOrigin-RevId: 377480089
2021-06-08 12:53:22 +01:00
bachinger
46687fecb1 Allow fast forward and rewind actions in compact view
PiperOrigin-RevId: 377107132
2021-06-03 13:51:40 +01:00
olly
85b6a51666 Add DoNotInstrument annotations to DASH and UI tests
PiperOrigin-RevId: 377048460
2021-06-02 18:19:02 +01:00
tonihei
2938d40bf4 Allow to specify the number of removed ad groups in AdPlaybackState.
This helps to remove old ad groups (e.g. those that fell out
of the live window) to keep the data size of AdPlaybackState small.

Also added this case to some existing unit tests to ensure it's
covered.

PiperOrigin-RevId: 376170653
2021-05-27 18:49:53 +01:00
olly
4b0c987675 Fix StyledPlayerView detachment
Issue: #8985
#minor-release
PiperOrigin-RevId: 375913914
2021-05-27 10:40:14 +01:00
Oliver Woodman
afe4217c1c Merge pull request #8943 from dlafayet:embeddedstyle2
PiperOrigin-RevId: 375484765
2021-05-26 11:28:37 +01:00
Denise LaFayette
e3228064f3 Introduce LanguageFeatureStyle interface to mark language features 2021-05-17 13:20:34 -07:00
Denise LaFayette
49dfe66bb3 Preserve Japanese language features when not applying embedded styling
Fix bug where rubies and boutens are missing, tate-chu-yoko is rendered
incorrectly when SubtitleView.setApplyEmbeddedStyles(false). This method
should only affect styling elements and not remove any language features.
2021-05-14 16:37:37 -07:00
olly
cc05e85700 Minor translation updates
#minor-release

PiperOrigin-RevId: 373543587
2021-05-13 11:05:15 +01:00
olly
5ff2d24fab Update PlayerNotficationManager to set PendingIntent.FLAG_IMMUTABLE on its Broadcast intent.
In Android 12 mutability flags have to be set on PendingIntents. If they are not, and the app targets Android 12, then the app will be crashed by the system.

PiperOrigin-RevId: 373427591
2021-05-13 10:51:48 +01:00
bachinger
4c1a294b2e Format Java source files
PiperOrigin-RevId: 372127633
2021-05-06 13:32:25 +01:00
olly
2ef52904af Remove remaining PlayerView/StyledPlayerView core dep
PiperOrigin-RevId: 372092412
2021-05-06 13:31:27 +01:00
olly
a264a0a04f Remove deprecated UI methods
PiperOrigin-RevId: 371809078
2021-05-04 11:18:26 +01:00
olly
dd0981a5b6 Access ExoPlayer specific UI components via reflection
PiperOrigin-RevId: 371799441
2021-05-04 11:18:07 +01:00
dlafayet
8c7d6447c0 Merge #8858: Support ebutts:multiRowAlign in TTML text renderer
Imported from GitHub PR https://github.com/google/ExoPlayer/pull/8858

Fix bug in text alignment inheritance where child does not correctly inherit ancestor's setting

@icbaker
Merge 70eb4bceb73b3f07e2f8d545b4fa7961189ac52a into 45616f916b28c9187b3e0f0dd18797464a079cdc

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/ExoPlayer/pull/8877 from dlafayet:multirowalign-cue d942b50a40525fea5d11b35a33d3bbc512550960
PiperOrigin-RevId: 371306966
2021-04-30 18:54:13 +01:00
olly
f7c4fd491b Remove deprecated PlaybackPreparer
PiperOrigin-RevId: 371170769
2021-04-30 11:44:07 +01:00
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