577 Commits

Author SHA1 Message Date
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
bachinger
63ae8f5417 Add PlayerNotificationManager.Builder
PiperOrigin-RevId: 355356169
2021-02-03 15:02:59 +00:00
olly
4791900848 Move Player.getTrackSelector to ExoPlayer
PiperOrigin-RevId: 353212567
2021-01-22 16:22:09 +00:00
krocard
789a211d53 Remove VideoDecoderOutputBufferRenderer from Player interface
The VideoDecoderOutputBufferRenderer will be set
automatically when setVideoSurfaceView is called on a
VideoDecoderGLSurfaceView.

#player-to-common

PiperOrigin-RevId: 351742601
2021-01-15 10:55:56 +00:00
olly
b688600b45 Remove deprecated PlayerView methods
PiperOrigin-RevId: 351365762
2021-01-13 00:03:41 +00:00
olly
eded1ca106 Update Styled non bottom buttons to be borderless.
This requires the parent of the background to draw and have padding large enough to support the size of the ripple.

The bottom buttons must remained bordered as the space around them is constrained.

PiperOrigin-RevId: 350590722
2021-01-08 15:32:58 +00:00
andrewlewis
456622a275 Deprecate stop(boolean)
`stop(true)` is almost the same as `clearMediaItems(); stop();`, except that
any player error isn't cleared. Clearing media items more clearly expresses the
intent.

PiperOrigin-RevId: 350516748
2021-01-07 10:45:02 +00:00
olly
751809b4e5 StyledPlayerView: Fix control overflow logic
PiperOrigin-RevId: 347657903
2020-12-17 11:25:53 +00:00
olly
7c28df62fd StyledPlayerView: Fix progressBar to noBar transformation
Also make some related naming improvements.

PiperOrigin-RevId: 347653802
2020-12-17 11:25:53 +00:00
olly
70ba62a281 StyledPlayerView: Add separate fullscreen button for minimal mode
Moving the fullscreen button around depending on modes is quite error
prone. There is currently a bug where the order of the settings cog
and fullscreen button can end up being swapped around as a result of
moving the fullscreen button to the minimal controls and back again.

It's less error prone just to have a second fullscreen button that's
always part of the minimal controls.

PiperOrigin-RevId: 347639484
2020-12-17 11:25:53 +00:00
olly
7ac19ff406 StyledPlayerView: Fix calculations to account for margins
Also make some related naming improvements.

PiperOrigin-RevId: 347631916
2020-12-17 11:25:53 +00:00
olly
94e745872d Fix UI menu not dismissing on API level 22 and earlier
Issue: #8272
#minor-release
PiperOrigin-RevId: 347010412
2020-12-14 10:18:43 +00:00
olly
2accb41ef6 StyledPlayerControlView: Fixes for minimal mode
- Re-layer layout so that the central controls end up on
  top (and, more importantly, have preference for receiving
  touch input) if the view is so small that elements start
  to overlap. This requires splitting the background and
  the controls themselves.
- Fix bug that could cause the scrubber to not be hidden
  in minimal mode, if the mode is entered when the controls
  are not visible.
- Fix positioning of minimal controls.
- Remove scrubber padding in minimal mode, since the scrubber
- Remove unused bar_gravity value.

PiperOrigin-RevId: 347008789
2020-12-14 10:18:33 +00:00
olly
7d478a9f5a StyledPlayerControlView: Simplify layout
- Replace some magic constants with use of layout gravity where possible
- Remove some attributes that are set in code anyway
- Remove some attributes that are set to their default values
- Inline transport controls
- Minor naming cleanup

PiperOrigin-RevId: 346980595
2020-12-14 10:18:23 +00:00
bachinger
297c2bf901 Make StyledPlayerControlView use control dispatcher for speed changes
#exofixit

PiperOrigin-RevId: 346972678
2020-12-14 10:18:03 +00:00
olly
aac22da2d6 Fix missing Javadoc
PiperOrigin-RevId: 346764371
2020-12-14 10:17:03 +00:00
olly
69dcad71de Update StyledPlayers control overlay scrim from 30% opacity to 60% opacity for Accessibility requirements.
PiperOrigin-RevId: 345190774
2020-12-03 17:10:44 +00:00
tonihei
f8041e1bc0 Add explaning comment to UI proguard file.
PiperOrigin-RevId: 344787160
2020-11-30 16:11:27 +00:00
krocard
538445572d Move FormatSupport in common
#player-to-common

PiperOrigin-RevId: 344558028
2020-11-30 09:33:11 +00:00
andrewlewis
4446e2637d Fix unexpected multiline comments
#exofixit

PiperOrigin-RevId: 344517105
2020-11-30 09:32:25 +00:00
tonihei
87cd644d00 Add remaining proguard config tests.
This ensures we have full test coverage for proguard configs now.
The only configs not covered by tests are:
 - IMA and OkHttp which copy recommended configs from the respective
   library. I couldn't reproduce failures by removing them (and thus
   couldn't write a test that ensures they are correct).
 - Some dontwarn lines that just suppress warnings.

In addition, this change fixes a couple of related issues:
 - Moved AV1 proguard config to correct module.
 - Removed mentioning of deprecated ExtractorMediaSource from README
 - Suppressed warning from IMA code that prevent proguarding under
   strict rules
 - Fixed wrong proguard exclusion in VP9 module.
 - Moved FLAC exclusion (DefaultExtractorsFactory) to correct module.
 - Added AlertDialog suppression for de-jetified code.
 - Removed unusued dependency from UI module that causes large APK
   size increase.

#exofixit
#minor-release

PiperOrigin-RevId: 344427532
2020-11-27 11:08:34 +00:00
olly
93ed71fb3e Support enabling next/previous actions in PlayerNotificationManager
The ref'd issue was marked as a doucmentation candidate, but I think
the confusion likely arises from the lack of "next" and "previous" in
the method names. Our other UI components also support enabling each
button individually, so this also brings notifications in line with
those.

Issue: #6491
#exofixit
PiperOrigin-RevId: 344058969
2020-11-24 16:04:14 +00:00
christosts
a8365c2cca Set tag for every track in TrackSelectionView
#minor-release

PiperOrigin-RevId: 344051610
2020-11-24 16:03:38 +00:00
tonihei
d4e1904604 Rollback of 483a350e84
*** Original commit ***

Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.

LSC: go/checker-lsc

Tested:
    TAP train for global presubmit queue
    http://test/OCL:342788973:BASE:342817196:1605636478036:6c558c0c

***

PiperOrigin-RevId: 343895651
2020-11-24 16:02:45 +00:00
bachinger
aec3e458d8 Use onEvents in PlayerNotificationManager
This saves a few lines of code and is nicer. We already did make sure to update the notification only once by posting because of b/145521438.

#exofixit

PiperOrigin-RevId: 343852256
2020-11-24 16:01:49 +00:00
olly
6c31e34528 Use onEvents in PlayerControlView/StyledPlayerControlView
#exofixit

PiperOrigin-RevId: 343821736
2020-11-24 16:01:29 +00:00
olly
b16cf5941e Rollback of 8d84a50fa1
*** Original commit ***

Update Styled non bottom buttons to be borderless.

This requires the parent of the background to draw and have padding large enough to support the size of the ripple.

The bottom buttons must remained bordered as the space around them is constrained.

***

PiperOrigin-RevId: 343531411
2020-11-23 10:49:00 +00:00
olly
2714fb0241 Remove custom speed from StyledPlayerControlView
Real apps probably aren't going to be allowing playback speed to be
set to anything other than the options listed in their UI, and so
this is not worth the complexity.

It also violates the idea that the UI should look the same regardless
of when the player is set on the view, since if it's set and then the
playback speed is changed to a listed option then the custom speed
remains, where-as if the speed is changed to a listed option and then
it's set, the custom speed will not be shown.

PiperOrigin-RevId: 343260450
2020-11-19 17:12:51 +00:00
olly
0191febbe6 Fix fastforward and rewind color tinting and text alignment
#minor-release
Issue: #7898
PiperOrigin-RevId: 343251455
2020-11-19 17:12:25 +00:00
tonihei
44009ea686 Rollback of fa6e01312b
*** Original commit ***

Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.

***

PiperOrigin-RevId: 343085407
2020-11-18 18:40:22 +00:00
olly
755f5b7d76 Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.
PiperOrigin-RevId: 342999709
2020-11-18 18:40:10 +00:00
olly
483a350e84 Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.
PiperOrigin-RevId: 342999390
2020-11-18 18:40:06 +00:00
olly
8381b9ff43 Update Styled Player settings dialogs to respect RTL.
PiperOrigin-RevId: 342672124
2020-11-17 13:50:45 +00:00
insun
ee3eba07ac Increase touch target height of timebar in StyledPlayerControlView
This change also introduces gravity attribute to DefaultTimeBar.

PiperOrigin-RevId: 342573167
2020-11-16 16:50:12 +00:00
olly
8d84a50fa1 Update Styled non bottom buttons to be borderless.
This requires the parent of the background to draw and have padding large enough to support the size of the ripple.

The bottom buttons must remained bordered as the space around them is constrained.

PiperOrigin-RevId: 342162231
2020-11-13 14:55:29 +00:00
olly
b1eef00b80 Fix incorrect IntDef usage
#minor-release

PiperOrigin-RevId: 341668326
2020-11-11 09:50:59 +00:00
bachinger
b03df4e8b5 Add dispatchPrepare(player) to ControlDispatcher
Issue: #7882
PiperOrigin-RevId: 341394254
2020-11-11 09:49:32 +00:00
ibaker
702e5cfb3e Fix or suppress nullness warnings introduced by checkerframework 3.7.0
PiperOrigin-RevId: 340826532
2020-11-06 16:33:59 +00:00
insun
6abee66504 Fix bottom area to have even paddings and make seekbar slimmer.
Also removed unused thumb resources.

PiperOrigin-RevId: 338184661
2020-10-21 10:24:14 +01:00
olly
0ad33116b6 Simplify artwork selection in PlayerView
PiperOrigin-RevId: 338056357
2020-10-21 10:24:04 +01:00
ibaker
2371b024dd Switch to an 'api' dependency on Guava
The 'implementation' dependency causes problems when resolving
ListenableFuture in contexts that also include the
com.google.guava:listenablefuture:1.0 dependency.

Issue: #7905
Issue: #7997
Issue: #7993
PiperOrigin-RevId: 337093024
2020-10-17 01:34:15 +01:00
olly
5e1c96ad99 Fix a couple of StyledPlayerControlView bugs
1. The first time the player controls are are made visible,
   there is no animation.
2. The first time the player controls are made visible, the
   "select tracks" button isn't displayed. When tapping to
   subsequently hide the player controls, the button briefly
   becomes visible and then is hidden again. This bug is due
   to state in StyledPlayerControlViewLayoutManager being
   out of sync, resulting in StyledPlayerControlView's
   onVisibilityChange not being called properly.

After this change both of these issues should be resolved.

PiperOrigin-RevId: 336704031
2020-10-13 16:28:17 +01:00
andrewlewis
c21529def3 Update translations for UI module
This should fix gradle errors like: "warn: removing resource
com.google.android.exoplayer2.demo:string/exo_controls_fastforward_by_amount_description
without required default value."

PiperOrigin-RevId: 336670827
2020-10-13 16:28:08 +01:00
insun
850510ac68 Expand bottom button's height and extend greyed background area to seekbar
Adjusted the bottom layout of StyledPlayerControlView :
- Enlarged bottom button's height to make tapping easier.
- Extended greyed background area to upper edge of seekbar.
- Gave padding between bottom edge of the overall layout and bottom buttons.
- Reduced horizontal margins between bottom buttons.

PiperOrigin-RevId: 336041160
2020-10-13 16:27:10 +01:00
insun
7228b2d718 Show overflow button only when there is no enough space
Previously, the overflow button was always shown at the bottom in StyledPlayerControlView
and hided the settings cog even when there is enough space.

With this change, the settings cog moves out from overflow and
the overflow button is shown only when the buttom space is not enough.

PiperOrigin-RevId: 336029179
2020-10-13 16:27:00 +01:00
andrewlewis
ac782235ca Fix miscellaneous nits/typos
PiperOrigin-RevId: 335642909
2020-10-06 16:57:31 +00:00