552 Commits

Author SHA1 Message Date
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
samrobinson
a552e35f6a Add getter and callbacks for static metadata retrieval.
Issue:#7266
PiperOrigin-RevId: 335416280
2020-10-06 14:31:32 +01:00
samrobinson
c95e43d9bd Do not require subtitleButton in custom layouts of StyledPlayerView
Every other subtitleButton has an if not null check, but does not force non null.

Issue: #7962
PiperOrigin-RevId: 334124323
2020-09-30 11:55:18 +01:00
Oliver Woodman
19a0258bac Merge pull request #7798 from yoobi:trackSelectionView
PiperOrigin-RevId: 333751261
2020-09-25 17:49:12 +01:00
bachinger
ea57e5d28b Always pass true for ongoing with the first notification
ISSUE: #7977
PiperOrigin-RevId: 333726625
2020-09-25 16:34:37 +01:00
olly
cef3e3cac1 Cleanup layout XMLs to be consistent with others
PiperOrigin-RevId: 333023580
2020-09-25 16:29:25 +01:00
olly
f16f8e59ff Replace duration strings with plurals
PiperOrigin-RevId: 332014290
2020-09-16 17:00:42 +01:00
olly
cdcb30ed21 Exclude Guava transitive annotation dependencies
PiperOrigin-RevId: 331148067
2020-09-11 16:01:15 +01:00
insun
222ba22b10 Fix not to show repeat button when its mode is NONE.
PiperOrigin-RevId: 330627047
2020-09-09 09:42:00 +01:00
insun
ea158dcdb0 Apply styled widget's bug fixes to legacy widget
- Prevent buffering when clicking ffwd button at the end of stream
- Set VR button disabled when listener is not registered

PiperOrigin-RevId: 330039336
2020-09-07 20:43:10 +01:00
insun
f68faff30b Set VR button disabled when listener is not registered (styled view)
PiperOrigin-RevId: 329851964
2020-09-07 20:42:33 +01:00
olly
b5a4dc8f36 Fix dispatch of play when in IDLE or ENDED
PiperOrigin-RevId: 329722282
2020-09-07 20:42:04 +01:00
insun
f31411b128 Revise Play/Pause button toggling logic
This CL fixes two bugs:
- Play/pause button toggling looked inconsistent when playback fails.
  When player state goes into idle, play button should dispatch
  playwhenready again.
- Clicking play button at the end of stream should restart playback.
  But previously it changed playwhenready state and so playback has
  been paused. This CL fix it.

PiperOrigin-RevId: 329675660
2020-09-07 20:41:27 +01:00
insun
be103ac553 Add padding to styled widget's settings items
PiperOrigin-RevId: 329671522
2020-09-07 20:41:18 +01:00
olly
5c24d1ccea Clean up unnecessary use of full package name
PiperOrigin-RevId: 329666401
2020-09-07 20:41:09 +01:00
insun
f68fc3e701 Prevent buffering when clicking ffwd button at the end of stream
PiperOrigin-RevId: 329634001
2020-09-07 20:40:32 +01:00
bachinger
0045d20d2c Document how to set the priority on API level above 25
Issue: #7820
PiperOrigin-RevId: 328917063
2020-09-07 20:39:08 +01:00
bachinger
8a8a1517ec Handle KEYCODE_HEADSETHOOK as alias of KEYCODE_MEDIA_PLAY_PAUSE
ISSUE: #7813
PiperOrigin-RevId: 328910220
2020-09-07 20:38:59 +01:00
Yo Ob
869981a360
Merge branch 'dev-v2' into trackSelectionView 2020-08-28 11:36:59 +02:00
tonihei
237cb9df54 Merge pull request #7804 from yoobi:TrackSelectionDialogBuilderTheme
PiperOrigin-RevId: 328726246
2020-08-27 14:41:28 +00:00
andrewlewis
74c493f51e Add back support for setting audio pitch
To play slow motion streams where the audio has been recorded at
slower speeds, it is necessary to be able to resample (rather than
time-stretch) the audio. This change undeprecates back the previously
deprecated PlaybackParameters class to allow apps to set pitch.

PiperOrigin-RevId: 328703116
2020-08-27 12:06:41 +01:00
Yoni Obadia
c9b4b98103 Review: Fix initSortedTrack to keep all groups in the TrackGroupArray 2020-08-27 12:19:56 +02:00
Yoni Obadia
551b6d65ae Review: Simplify getSortedIndexFromInitialTrackGroup 2020-08-27 10:15:17 +02:00
Yoni Obadia
ed58280d23 Review: Update according to review 2020-08-27 09:46:30 +02:00
Yoni Obadia
0176422f0b Review: Update according to review 2020-08-26 19:07:47 +02:00
Yoni Obadia
425bd2d801 improvement: get already existing sortingTrackGroups if exists 2020-08-26 14:31:44 +02:00