381 Commits

Author SHA1 Message Date
olly
b68d19bceb Add layer of indirection for drawables
This allows easy overriding of the resources by app developers

Issue: #6709
PiperOrigin-RevId: 283306121
2019-12-04 09:58:20 +00:00
ibaker
79b7af656b Rollback of <unknown commit>
*** Original commit ***

Disable test coverage again

https://issuetracker.google.com/issues/37019591 causes local variables can't be found while debugging.

***

PiperOrigin-RevId: 280666758
2019-11-17 00:33:26 +00:00
olly
4fd881a551 Suppress warnings emitted by Checker Framework version 3.0.0
More information:
https://docs.google.com/document/d/16tpK6aXqN68PvTyvt4siM-m7f0NXi_8xEeitLDzr8xY/edit?usp=sharing
Tested:
    TAP --sample ran all affected tests and none failed
    http://test/OCL:279845168:BASE:279870402:1573537714395:80ca701c
PiperOrigin-RevId: 279891832
2019-11-15 05:14:12 +00:00
ibaker
6286491621 Remove SubtitlePainter from null-checking blacklist
PiperOrigin-RevId: 279107241
2019-11-15 05:12:50 +00:00
olly
355ed11a3c Suppress warnings emitted by Checker Framework version 2.11.1
More information:
https://docs.google.com/document/d/16tpK6aXqN68PvTyvt4siM-m7f0NXi_8xEeitLDzr8xY/edit?usp=sharing

Tested:
    TAP --sample ran all affected tests and none failed
    http://test/OCL:278915274:BASE:278884711:1573074344615:a6701677
PiperOrigin-RevId: 279080514
2019-11-15 05:12:17 +00:00
olly
880b879e8c Suppress warnings emitted by Checker Framework version 2.11.1
More information:
https://docs.google.com/document/d/16tpK6aXqN68PvTyvt4siM-m7f0NXi_8xEeitLDzr8xY/edit?usp=sharing

Tested:
    TAP train for global presubmit queue
    http://test/OCL:278152710:BASE:278144052:1572760370662:22459c12
PiperOrigin-RevId: 278241536
2019-11-05 16:17:39 +00:00
olly
c5c50078d7 Reset MediaSession shuffle/repeat modes if player is null
- This is for consistency with PlayerControlView.

- Also update PlayerNotificationManager notification if shuffle
  mode changes. This is for consistency with what happens when
  the repeat mode changes. By default the notification will be
  unchanged, but custom implementations can extend and then
  override createNotification, and given these modes change
  infrequently it feels like we can just do this. The alternative
  for achieving consistency would be to remove handling of repeat
  mode changes.

Issue: #6582
PiperOrigin-RevId: 277925094
2019-11-05 16:16:45 +00:00
andrewlewis
656556b828 Clean up naming for GLSurfaceViews
PiperOrigin-RevId: 277896757
2019-11-05 16:15:29 +00:00
ibaker
e922f83401 Change nested ternary to switch in SubtitlePainter
The nested ternary is quite hard to read imo, and I believe this is a
no-op change that captures the intent more clearly.

PiperOrigin-RevId: 277320461
2019-10-30 08:51:57 +00:00
ibaker
7277df3547 Remove @NonNull where it's implied by @NonNullApi
Also remove it from all tests, these aren't covered by the null-checker

Covered by the following package-info.java files:
- j/c/g/a/exoplayer2/ext/mediasession/package-info.java
- j/c/g/a/exoplayer2/package-info.java
- j/c/g/a/exoplayer2/offline/package-info.java
- j/c/g/a/exoplayer2/video/package-info.java
- j/c/g/a/exoplayer2/ui/package-info.java

PiperOrigin-RevId: 277038916
2019-10-30 08:50:42 +00:00
olly
c139281119 Update translations
PiperOrigin-RevId: 275869409
2019-10-30 08:47:36 +00:00
olly
7ccbc4c436 Remove VR code
- Leaving GvrAudioProcessor for now.
- Removing GvrPlayerActivity because it was never released. Also removing
  related UI classes. These were released, but it's unlikely anyone would
  have been using them directly.

PiperOrigin-RevId: 275822516
2019-10-30 08:47:06 +00:00
olly
64786c6ce4 Refactor GlViewGroup to ViewRenderer
GlViewGroup doesn't work properly as an actual ViewGroup. For example,
it doesn't support addition of child views after instantiation. This
change turns the class into a renderer, which is also more consistent
with other classes in the package.

PiperOrigin-RevId: 275322295
2019-10-18 17:42:19 +01:00
olly
5e538a2a28 Clean up GvrPlayerActivity
PiperOrigin-RevId: 274845045
2019-10-15 23:08:23 +01:00
andrewlewis
1c66010b4a Add MediaFormat on video frame metadata listener
This is useful for apps that want to access HDR metadata that MediaCodec puts
in its output format.

PiperOrigin-RevId: 274169985
2019-10-13 12:41:47 +01:00
bachinger
674e92e1ee provide content description for the player view to make show/hide controls accessible
PiperOrigin-RevId: 274148026
2019-10-13 12:41:08 +01:00
sofijajvc
5cf82a5079 Support GL rendering with SimpleExoPlayer and PlayerView
PiperOrigin-RevId: 273760294
2019-10-10 14:45:14 +01:00
olly
c269890259 Define default colors as constants
It's confusing that app:played_color also modifies the colors
that derive from it, but the corresponding setter does not. It
seems generally clearer just to define constants.

PiperOrigin-RevId: 273249557
2019-10-07 16:31:55 +01:00
olly
efe6e6408a Cleanup: Only clamp seek positions for FFWD/RWND
It's confusing that seekTo(player, windowIndex, positionMs) does
clamping, because it only makes sense if windowIndex is the current
window.

Note: This doesn't actually fix anything (other than code clarity).
In cases where we were passing other windowIndices, we always
passed 0 as the position and so the clamping logic wouldn't have
had any effect.
PiperOrigin-RevId: 272857104
2019-10-04 13:33:09 +01:00
andrewlewis
957387855e Add missing player null check
PiperOrigin-RevId: 272654378
2019-10-04 13:32:04 +01:00
tonihei
4df2262bcf Use Player.isPlaying in appropriate places.
This method should be used where we previously checked for active playback
by state==READY and playWhenReady=true. Using the new method ensures we take
audio focus into account for these usages.

Also update some method naming to avoid confusion with the isPlaying method.

Issue:#6203
PiperOrigin-RevId: 270910982
2019-10-02 21:25:56 +01:00
olly
b34a10bc1d Update translations
PiperOrigin-RevId: 269521864
2019-09-17 16:56:38 +01:00
bachinger
f7e9e185f7 allowing 36 characters for shuffle mode off
PiperOrigin-RevId: 268478545
2019-09-13 13:50:33 +01:00
bachinger
e567f8edd0 allow 33 characters for strings of shuffle on/off
PiperOrigin-RevId: 268238764
2019-09-10 17:43:11 +01:00
bachinger
a12c6641d9 provide content description for shuffle on/off button
PiperOrigin-RevId: 266884166
2019-09-05 10:48:45 +01:00
bachinger
e4eb6b7ea9 move transparency values of buttons to resources to make it accessible for customization
PiperOrigin-RevId: 266880069
2019-09-05 10:48:45 +01:00
olly
0dc997103b Use constant to define androidx media version
PiperOrigin-RevId: 266802551
2019-09-05 10:45:24 +01:00
olly
2d0b10a73a Use constant to define androidx annotation version
PiperOrigin-RevId: 266801762
2019-09-05 10:45:08 +01:00
bachinger
d2c056eb91 move transparency of shuffle mode off button to bitmap
PiperOrigin-RevId: 266795413
2019-09-05 10:44:51 +01:00
bachinger
eedf50fdca use isPlaying to determine which notification action to display in compact view
PiperOrigin-RevId: 266782250
2019-09-05 10:44:34 +01:00
olly
a02237de20 Fix imports
PiperOrigin-RevId: 266676413
2019-09-01 22:03:52 +01:00
tonihei
389eca6e07 Merge robolectric_testutils into testutils.
We no longer need two modules as AndroidX-Test takes care of the system
abstraction and we no longer have Robolectric Handler/Looper workarounds.

PiperOrigin-RevId: 262363201
2019-08-09 18:36:32 +01:00
tonihei
591bd6e46a Fix UI module API nullability annotations and make non-null-by-default.
PiperOrigin-RevId: 261872025
2019-08-06 15:53:06 +01:00
tonihei
790deb71db Check if controller is used when performing click directly.
Issue:#6260
PiperOrigin-RevId: 261647858
2019-08-05 10:55:23 +01:00
olly
fb0481c520 Bump annotations dependency + update release notes
PiperOrigin-RevId: 261353271
2019-08-02 19:04:56 +01:00
Oliver Woodman
b57aa34b66 Merge pull request #6239 from ittiam-systems:vorbis-picture-parse
PiperOrigin-RevId: 261087432
2019-08-01 20:37:21 +01:00
Venkatarama NG. Avadhani
27a4f96cb1 Clean up FLAC picture parsing 2019-07-30 12:15:36 +05:30
Venkatarama NG. Avadhani
ea64ecf2c4 Parse Picture Metadata in FLAC 2019-07-29 14:34:35 +05:30
Oliver Woodman
0e7f015020 Merge pull request #6042 from Timbals:dev-v2
PiperOrigin-RevId: 258812820
2019-07-18 19:40:36 +01:00
bachinger
49a2e5a5cb add manifest to Timeline.Window
- Remove manifest argument from callbacks of Player.EventListener and
  SourceInfoRefreshListener. Instead make it accessible through
  Player.getCurrentManifest() and Timeline.Window.manifest.
- Fix all MediaSource implementation to include the manifest in the
  Timeline instead of passing it to the SourceInfoRefreshListener.
- Refactor ExoPlayerTestRunner, FakeTimeline, FakeMediaSource to
  reflect these changes and make tests pass.

PiperOrigin-RevId: 257359662
2019-07-14 16:20:45 +01:00
olly
ecd88c71d2 Remove some UI classes from nullness blacklist
PiperOrigin-RevId: 256751627
2019-07-08 19:41:47 +01:00
tonihei
71de1d37ac Don't consume touch events if no controller is attached.
Issue:#6109
PiperOrigin-RevId: 255933121
2019-07-02 17:47:45 +01:00
tonihei
8faac0344b Fix checkerframework 2.8.2 warnings.
The updated version issues more warnings than before.
Most of the changes are related to annotation placement.

PiperOrigin-RevId: 255371743
2019-07-02 17:44:17 +01:00
bachinger
1952988f84 keep notification when stop(false) is called
ISSUE: #6041
PiperOrigin-RevId: 253958225
2019-06-19 16:37:15 +01:00
Tim Balsfulland
04524a688d
Add convenience constructors for notification channel descriptions 2019-06-15 15:59:57 +02:00
olly
6e7012413b Keep controller visible on d-pad key events
PiperOrigin-RevId: 250661977
2019-05-30 15:26:32 +01:00
aquilescanta
6b68bc0c9d Fix anchor usage in SubtitlePainter's setupBitmapLayout
According to Cue's constructor (for bitmaps) documentation:
+ cuePositionAnchor does horizontal anchoring.
+ cueLineAnchor does vertical anchoring.

Usage is currently inverted.

Issue:#5633
PiperOrigin-RevId: 250253002
2019-05-30 15:25:28 +01:00
olly
3afdd7ac5a Put @Nullable annotation in the right place
PiperOrigin-RevId: 249828748
2019-05-30 15:10:55 +01:00
olly
37fc1d879d Propagate attributes to DefaultTimeBar
Issue: #5765
PiperOrigin-RevId: 249251150
2019-05-23 13:26:50 +01:00
andrewlewis
491edd1edc Update surface directly from SphericalSurfaceView
The SurfaceListener just sets the surface on the VideoComponent, but
SphericalSurfaceView already accesses the VideoComponent directly so it seems
simpler to update the surface directly.

PiperOrigin-RevId: 249242185
2019-05-23 13:26:19 +01:00