1429 Commits

Author SHA1 Message Date
olly
7b0a7f1295 Remove stray space
PiperOrigin-RevId: 382297051
2021-07-09 08:24:44 +01:00
olly
a55c0654fb Improve Cronet and OkHttp READMEs
PiperOrigin-RevId: 382279955
2021-06-30 13:54:16 +01:00
olly
dea52048cb Bump dependency versions
PiperOrigin-RevId: 382277352
2021-06-30 13:53:01 +01:00
samrobinson
9013facdd7 Rename PlaylistMediaMetadata to PlaylistMetadata in Player.
This affects the setter, getter and callback, as well as various
media 3 methods.

PiperOrigin-RevId: 382275672
2021-06-30 13:51:51 +01:00
aquilescanta
155e27ec7c Move ExoPlaybackException back into core
PiperOrigin-RevId: 381941053
2021-06-30 13:47:30 +01:00
olly
7aaba1ffe5 Migrate usage of Player.EventListener to Player.Listener
PiperOrigin-RevId: 381837274
2021-06-30 13:43:51 +01:00
olly
ea99c3fa94 Add ability to set Cronet request priority
PiperOrigin-RevId: 381833403
2021-06-30 13:42:42 +01:00
Oliver Woodman
8588bdb02a Merge pull request #9119 from chvp:media2-dispatch-previous-next
PiperOrigin-RevId: 381833313
2021-06-30 13:41:35 +01:00
olly
bb82e7df9d Cronet: Align terminology with documentation
PiperOrigin-RevId: 381472436
2021-06-30 13:40:24 +01:00
olly
6fe2f25fe9 Update DataSource extension documentation
Also upgrade the RTMP extension to use an inner class
for its factory.

PiperOrigin-RevId: 381469114
2021-06-30 13:39:09 +01:00
olly
ec9f512fee OkHttp: Upgrade to 4.9.1 (minSdkVersion 21)
Until now, we have stuck with the 3.12 long-term branch so as
to keep support for older API levels. However, this means that
the version we're using is 2.5 years old at this point. The
3.12 branch will stop receiving critical updates in December
2021.

Since use of the OkHttp extension is optional anyway, it seems
preferable to move to a modern version of OkHttp at this point.

PiperOrigin-RevId: 381465269
2021-06-30 13:37:58 +01:00
olly
bcd4bb87e5 Deprecate CronetEngineWrapper
PiperOrigin-RevId: 381239971
2021-06-30 13:32:43 +01:00
olly
1e9b6d66a3 [CronetDataSource] Support keeping the POST method and body for 302
Currently when a HTTP POST request receives a 302, CronetDataSource will change the request method from POST to GET for the redirected request, and drop the post body. This aligns with the behaviours of many user agents, but our use case would like to keep the POST method and the post body.

org.chromium.net.UrlRequest.followRedirect also changes POST to GET for 302, so should be avoided here.

PiperOrigin-RevId: 381233011
2021-06-30 13:28:50 +01:00
aquilescanta
fc26d4eeb1 Remove the last deprecated ParserException constructor
PiperOrigin-RevId: 381221669
2021-06-30 13:27:45 +01:00
olly
75c06cc4e7 Cronet: Cleanup and simplify CronetEngineWrapper
A subsequent change will deprecate CronetEngineWrapper and move
all of the logic into a utility class for obtaining a suitable
CronetEngine.

This change also deprioritizes use of unknown cronet providers.

PiperOrigin-RevId: 381051164
2021-06-30 13:24:01 +01:00
olly
116e50f365 Cronet: Deprecate internal fallback
The way CronetDataSource.Factory can internally fall back to another
factory is confusing and unnecessary. In the case the application cannot
instantiate a CronetEngine, it should directly use another factory.

This makes CronetDataSource more consistent with OkHttpDataSource. In
both cases, their factory constructors take the component that the
respective libraries advise should only be created once by the application,
which are CronetEngine and OkHttpClient respectively.

CronetEngineWrapper will be deprecated in a subsequent change.

PiperOrigin-RevId: 381016504
2021-06-30 13:21:39 +01:00
aquilescanta
1a8592c5c0 Add Player.Listener.onPlayerErrorChanged
Equivalent to onPlayerError, except it's also called for null.

PiperOrigin-RevId: 381015336
2021-06-30 13:17:49 +01:00
Charlotte Van Petegem
efc6992e17
Remove useless assertions 2021-06-28 12:06:28 +02:00
Charlotte Van Petegem
13fb0baf0e
Use better builtin ControlDispatcher methods in media2 extension 2021-06-26 12:31:25 +02:00
aquilescanta
fc1d3dd192 Make onPlayerError take a PlaybackException
PiperOrigin-RevId: 380174672
2021-06-21 22:15:01 +01:00
aquilescanta
780760358e Make LeanbackPlayerAdapter work with a PlaybackException
In preparation for the onPlayerError callback to take a PlaybackException.

PiperOrigin-RevId: 379939108
2021-06-21 22:05:18 +01:00
olly
6c05a469cb Add MediaSessionConnector#setDispatchUnsupportedActionsEnabled(boolean)
This enables actions that are not advertised by the MediaSession to be dispatched either way.

PiperOrigin-RevId: 379765015
2021-06-21 22:00:23 +01:00
olly
a3dbd61239 Remove obsolete Checker Framework suppression strings
More information: go/checker-3130-lsc

Tested:
    Some test failures are present, but the CL author has decided to mail the change anyway
PiperOrigin-RevId: 379622938
2021-06-21 21:56:37 +01:00
kimvde
912acacbe1 Add onFastForward/RewindIncrementChanged to Player
PiperOrigin-RevId: 379497408
2021-06-15 18:42:19 +01:00
kimvde
53d67daaef Add available commands to fast forward and rewind
PiperOrigin-RevId: 378842286
2021-06-11 12:24:37 +01:00
samrobinson
5204bb0d44 Add playlist MediaMetadata to the Player.
PiperOrigin-RevId: 378407609
2021-06-10 11:23:30 +01:00
bachinger
35202cc1a2 Format README of vp9 decoder module
PiperOrigin-RevId: 378390492
2021-06-10 11:22:16 +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
kimvde
e4263c4a67 Add fast forward and rewind methods to Player
PiperOrigin-RevId: 378104210
2021-06-08 13:04:56 +01:00
olly
4b30cca914 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: 377925828
2021-06-08 13:02:47 +01:00
aquilescanta
146648ce22 Make MediaSessionConnector depend on PlaybackException
PiperOrigin-RevId: 377529353
2021-06-08 12:57:38 +01:00
bachinger
80927843cb Remove VpxOutputBuffer from vp9 decoder extension
PiperOrigin-RevId: 377346438
2021-06-08 12:48:57 +01:00
kimvde
fc47c2fe86 Add missing @DoNotInstrument annotations
PiperOrigin-RevId: 377006047
2021-06-02 18:13:19 +01:00
tonihei
0d0ccadc83 Add getter for ad groups in AdPlaybackState.
This allows to decouple the data structure from the access. In
a future change, this allows to completely remove old ad groups
(e.g. for live streams where the number of groups would otherwise
grow forever).

Also move the time into the group itself for better encapsulation.

PiperOrigin-RevId: 376170408
2021-05-27 18:48:40 +01:00
aquilescanta
4e749e7afe Disable reconnection CastOptions
This includes setResumeSavedSession(false) and setEnableReconnectionService(false).

PiperOrigin-RevId: 376162880
2021-05-27 16:10:54 +01:00
aquilescanta
8f04d36f59 Inline redundant constructor
PiperOrigin-RevId: 376005620
2021-05-27 10:46:06 +01:00
bachinger
095e2feb20 Enable source code formatting
PiperOrigin-RevId: 375979170
2021-05-27 10:42:22 +01:00
olly
ee2af43a54 Fix file formatting
PiperOrigin-RevId: 375919564
2021-05-27 10:40:54 +01:00
olly
e9f66fc5d1 Replace internal dependencies on monolithic module
PiperOrigin-RevId: 375054051
2021-05-21 12:05:56 +01:00
olly
0de6bc861a Format *_jni.cc files
PiperOrigin-RevId: 374830877
2021-05-20 15:40:34 +01:00
olly
2566b24642 Remove deprecated Listener.onTimelineChanged
PiperOrigin-RevId: 374171038
2021-05-17 18:19:13 +01:00
tonihei
8a5d21adef Remove reference to deprecated Player.EventListener.
#minor-release

PiperOrigin-RevId: 372925409
2021-05-10 23:40:26 +01:00
samrobinson
2914e574e6 Rename MediaMetadata trackTitle and trackArtist to title and artist.
#minor-release

PiperOrigin-RevId: 372537414
2021-05-07 14:58:03 +01:00
bachinger
a9fc3185fe Do not mock NetworkException
PiperOrigin-RevId: 372321626
2021-05-06 13:36:00 +01:00
bachinger
5595c48739 Optionally deduplicate updating MediaMetadataCompat
PiperOrigin-RevId: 372146631
2021-05-06 13:33:44 +01:00
bachinger
4c1a294b2e Format Java source files
PiperOrigin-RevId: 372127633
2021-05-06 13:32:25 +01:00
bachinger
39ac09e7c6 Add @DoNotInstrument for unit test classes of extensions
PiperOrigin-RevId: 372101509
2021-05-06 13:32:05 +01:00
bachinger
a3e06f7d4e Add @DoNotIntrument to test classes of the CroNet extension
PiperOrigin-RevId: 372092122
2021-05-06 13:31:08 +01:00
olly
a264a0a04f Remove deprecated UI methods
PiperOrigin-RevId: 371809078
2021-05-04 11:18:26 +01:00
jinpark
f7a8c6e4de Add command for setting media items metadata
PiperOrigin-RevId: 371482546
2021-05-04 11:17:22 +01:00