389 Commits

Author SHA1 Message Date
andrewlewis
56944caa21 Allow registration of control overlays for ad viewability
Switch from passing an ad UI ViewGroup to passing an object that can also
provide information about controls overlays.

Also switch to using a dedicated overlay for ads instead of the overlay frame
layout, which apps have easy access to.

PiperOrigin-RevId: 233393500
2019-02-18 15:58:06 +00:00
olly
8401097ead Upgrade gradle plugin and friends
PiperOrigin-RevId: 233390513
2019-02-18 15:57:55 +00:00
tonihei
abb53d7ce7 Support multiple overrides in TrackSelectionView and factor out Builder.
Supporting multiple overrides allows to select tracks from multiple groups, if
enabled. As more options are added, the creation of the dialog is moved to a
separate builder class.

PiperOrigin-RevId: 233366282
2019-02-18 15:57:44 +00:00
andrewlewis
ef139b2e31 Add an overlay FrameLayout for ad UI
This will be used instead of the current overlay FrameLayout (which apps can
interact with directly).

PiperOrigin-RevId: 233077175
2019-02-18 15:57:29 +00:00
Arnold Szabo
eaf0d40886 Extract time bar delay calculations to a static method 2019-02-16 12:17:09 +02:00
Arnold Szabo
ecfce46296 Changes according to the code review 2019-02-13 19:31:11 +02:00
Arnold Szabo
62e6455dce Taking consideration the current position before calculating the delay before the next update 2019-02-12 23:02:34 +02:00
Arnold Szabo
c905891d10 Taking into consideration the media's duration when updating the time bar 2019-02-10 21:43:34 +02:00
olly
ebfbb4f915 Hide progress bar for end state download notifications
Now we're reusing the builder, it's necessary to set maxProgress
back to 0 to avoid the progress bar appearing for end state
notifications.

PiperOrigin-RevId: 232520007
2019-02-06 15:46:18 +00:00
olly
e3981ec484 Fix notifications to avoid flicker on KitKat
On KitKat you need to reuse the same notification builder when
generating a notification that's intended to replace a previous
one. See:

https://stackoverflow.com/questions/6406730/updating-an-ongoing-notification-quietly

PiperOrigin-RevId: 232503682
2019-02-06 15:45:24 +00:00
andrewlewis
a738191627 Remove remainder of skip button focus hack
PiperOrigin-RevId: 231772920
2019-01-31 14:06:38 +00:00
olly
355b3d6334 Increase minSdkVersion to 16
The combination of pre-16 API levels accounting for ~0.5% of the device
population, and that the most important components in ExoPlayer (e.g.
the MediaCodec renderers) have always required API level 16, mean it's
very unlikely this will negatively impact on anyone.

PiperOrigin-RevId: 230701808
2019-01-29 16:41:45 +00:00
olly
4182f37b6e Make notification dismissible iff player is active
Seems like more useful default behaviour

PiperOrigin-RevId: 230356813
2019-01-29 16:40:20 +00:00
olly
29711b922d Cancel notification on dismiss
This doesn't happen automatically after all on older devices

PiperOrigin-RevId: 230251258
2019-01-29 16:39:56 +00:00
tonihei
ac86d3b5f6 Add missing @Nullable to SimpleExoPlayer fields and methods.
Issue:#5402
PiperOrigin-RevId: 229758525
2019-01-17 17:26:35 +00:00
bachinger
76baa5724c solve nullness check warnings with asserts
PiperOrigin-RevId: 229755532
2019-01-17 17:26:14 +00:00
bachinger
16a185de1d make PlayerNotificationListener better suited for foreground services
Issue: #5301
Issue: #4988
Issue: #4813
Issue: #5344
Issue: #5117
PiperOrigin-RevId: 229603354
2019-01-17 14:37:23 +00:00
bachinger
8adc16a623 allow developers to set the subText of the notifcation
Issue: #5344
PiperOrigin-RevId: 229527963
2019-01-17 14:37:00 +00:00
eguven
7ae768376c Prepare DownloadState for upcoming changes
Made DownloadState top level class.
Replaced action field DownloadAction fields.
Added removing, removed and restarting states.
Renamed started state to downloading.

PiperOrigin-RevId: 227664735
2019-01-08 07:33:23 +00:00
tonihei
9728ac54ba Improve doc for setKeepContentOnPlayerReset.
This also applies when seeking or transitioning to unprepared media, which
isn't clear from the current documentation.

Issue:#5267
PiperOrigin-RevId: 226486685
2019-01-08 07:31:49 +00:00
olly
c2c5e560e9 Add missing ..
PiperOrigin-RevId: 225379305
2018-12-14 15:42:07 +00:00
olly
9c4258fef9 Clarify that the shutter can prevent flicker
PiperOrigin-RevId: 225374071
2018-12-14 15:41:47 +00:00
Oliver Woodman
3bfe103b82 Merge pull request #5245 from natario1:videosize-override
PiperOrigin-RevId: 225187852
2018-12-14 15:40:57 +00:00
eguven
4bf42bd2ad Rename TaskState to DownloadState
PiperOrigin-RevId: 225145311
2018-12-14 15:40:16 +00:00
tonihei
defbd04675 Update StartDownloadDialogHelper to use TrackSelectionView.
This is now possible as the download helper uses a track selector.

PiperOrigin-RevId: 225014517
2018-12-14 15:39:43 +00:00
Mattia Iavarone
c819856530 Add protected method to override the AspectRatioFrameLayout aspect ratio 2018-12-12 11:48:42 +01:00
olly
05a79a417a Fall back to TYPE_ROTATION_VECTOR if TYPE_GAME_ROTATION_VECTOR unavailable
Issue: #5119
PiperOrigin-RevId: 222978448
2018-11-27 15:46:10 +00:00
olly
f4d9deddaf Remove spurious VisibleForTesting annotation
It needs to have package visiblity, otherwise nothing can use it.

PiperOrigin-RevId: 222821546
2018-11-26 16:40:40 +00:00
olly
ea8696d820 Ensure changes are reflected into attrs
PiperOrigin-RevId: 222628386
2018-11-23 17:40:42 +00:00
tonihei
1a9705e247 Fix show_buffering attribute values.
The corresponding IntDef has changed without updating the attribute values.

Issue:#5139
PiperOrigin-RevId: 222598044
2018-11-23 12:31:24 +00:00
olly
9ca019b8f8 PlaybackNotificationManager should show play button in ENDED state
- This brings it in line with PlayerControlView. The play action is displayed
instead, and pressing it seeks to the default position of the current window.
- Do the same for MediaSessionConnector
- Add support for PlaybackPreparer consistent with PlayerControlView

Issue: #5072

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221076008
2018-11-14 18:01:34 +00:00
olly
eb6859e436 Align navigation implementation across UI components
This change also paves the way for splitting out functionality into a utility class.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221070262
2018-11-14 17:56:39 +00:00
olly
7508219416 Simplify PlayerControlView fast forward and rewind implementation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221065798
2018-11-14 17:54:58 +00:00
bachinger
91d9fbd95d pass the notification listener to the constructor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220616166
2018-11-14 17:41:45 +00:00
olly
15dda17905 Make TimelineQueueNavigator shuffle aware
Issue: #5065

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220468285
2018-11-07 17:57:42 +00:00
olly
0dfd478a20 Add missing update on repeat toggle mode change
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220461315
2018-11-07 17:57:42 +00:00
eguven
7a114cb374 Uncomment VisibleForTesting annotations
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220432564
2018-11-07 17:57:42 +00:00
eguven
d7e23f826b Fix package visibility comments
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220323772
2018-11-07 17:57:42 +00:00
andrewlewis
abb7d8a2d5 Include UI module tests in open source push
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220277660
2018-11-07 17:57:42 +00:00
eguven
37f4540156 Move BaseGvrPlayerActivity to com.google.android.exoplayer2.ext.gvr
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219829614
2018-11-06 11:07:06 +00:00
olly
e1c6229cc8 Bump version to 2.9.1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219609471
2018-11-01 11:22:39 +00:00
andrewlewis
1094da2b61 Fix player state transitions for postroll ads
Before this change, the player state would be STATE_ENDED then
STATE_BUFFERING (when the postroll ad was marked as played) then
STATE_ENDED again.

Queueing a final content media period with start point equal to
the content duration after a postroll ensures that the player
state doesn't change to STATE_ENDED transiently.

Switch from using C.TIME_END_OF_SOURCE to C.TIME_UNSET for media
periods that should not have an end point and are not followed
by an ad.

Content media periods before postrolls have end position
C.TIME_END_OF_SOURCE. If the postroll ad loads, its content
position is set to the content duration, which should be known
at the point of loading the postroll, then a final 'empty'
content media period with start position equal to its duration
is queued. If the postroll fails to load, this empty content
media period is queued up directly after the preceding content
media period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219443683
2018-10-31 13:54:15 +00:00
eguven
5de17b9adc Add support for playing spherical videos on Daydream
RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219119888
2018-10-31 13:42:19 +00:00
olly
194d0f3331 Add a bit of structure DefaultTrackSelector, for sanity
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219109829
2018-10-31 13:38:51 +00:00
aquilescanta
9ea678c5e6 Add ExoCastMessage
ExoCastMessage contains all player management messages that the sender app can
send to the receiver app. ExoCastMessages can be serialized as JSON strings.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218846977
2018-10-31 13:35:22 +00:00
olly
ede62e97b2 Fix track selection when forceLowestBitrate is enabled:
- Only use bitrate when comparing two tracks if their bitrates are
  actually different.
- For audio, prefer to use bitrate over selection flags.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218660886
2018-10-31 13:33:32 +00:00
eguven
ea49d39a4d Add VR string and icon
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218137830
2018-10-24 18:29:10 +01:00
vsethia
048c8bd68f Snapshots are going to become the default soon and these tests are failing when
reloading frmo snapshots. b/117347850. This is a no-op change as the current
default == _fullboot. When we globally flip and make snapshots the default,
these tests would fail and we are moving them over so that when we flip your
tests still pass.

https://groups.google.com[]forum/#!topic/mobile-ninjas/Y69PTAT5GyY

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=216634430
2018-10-15 09:28:21 +01:00
tonihei
0a7745bc03 Fix some random Android Studio warnings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215904019
2018-10-15 09:26:36 +01:00
eguven
e91065c4b0 Remove ProjectionRenderer.EyeType
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215562599
2018-10-03 22:13:34 +01:00