150 Commits

Author SHA1 Message Date
Gaëtan Muller
71b8c32a6f Remove Multidex 2024-07-24 16:17:00 +01:00
tonihei
6ac60c6dff Disable enhanced Java 8 desugaring
This avoids that apps have to depend on this additional config

Issue: androidx/media#1312
PiperOrigin-RevId: 631447767
2024-05-07 09:26:36 -07:00
tonihei
16df05ec29 Upgrade Gradle and AGP
The newer versions include a bugfix that automatically highlights
when our project requires enhanced Java 8 desugaring.

Issue: androidx/media#1312
PiperOrigin-RevId: 631373018
2024-05-07 04:20:55 -07:00
bachinger
4777d62d31 Rollback of 8e2869278c
PiperOrigin-RevId: 607264513
2024-02-15 02:35:12 -08:00
asinclair
8e2869278c Internal Cleanup
PiperOrigin-RevId: 607117264
2024-02-14 15:06:10 -08:00
tonihei
ed5b7004b4 Replace or suppress deprecated usages
Many usages are needed to support other deprecations and some
can be replaced by the recommended direct alternative.

Also replace links to deprecated/redirected dev site

PiperOrigin-RevId: 601795998
2024-01-26 10:06:18 -08:00
ibaker
d60596cfca Use package-level @OptIn for demo apps
This demonstrates that `@OptIn` can now be used at the package-level
(since [`androidx.annotation:annotation-experimental:1.3.0`](https://developer.android.com/jetpack/androidx/releases/annotation#annotation-experimental-1.3.0)).

PiperOrigin-RevId: 572187729
2023-10-10 03:02:25 -07:00
ibaker
5e96d355e1 Suppress NewApi lint warning on <vector> usage in drawables
PiperOrigin-RevId: 545207308
2023-07-05 09:08:51 +00:00
bachinger
5afe7552fe Document how to use a custom receiver app with the cast demo
#minor-release
Issue: androidx/media#452
PiperOrigin-RevId: 539915277
2023-06-14 20:30:32 +01:00
bachinger
c2f78db87e Clean up HLS sample for cast demo
Issue: androidx/media#452
#minor-release
PiperOrigin-RevId: 539613535
2023-06-12 14:11:36 +00:00
ibaker
b3db85133a Add android.namespace to all build.gradle files
This is a pre-requisite for the Android Studio upgrade assistant to
upgrade from AGP 7.2.2 to 8.0.1, otherwise it fails and complains
this is missing.

Issue: androidx/media#409
PiperOrigin-RevId: 533463246
2023-05-19 17:19:15 +01:00
rohks
d260b0c2a0 Switch incorrectly configured native multidex to legacy for demos
Native multidex can only be used for binaries with minSdkVersion of 21 or higher, but minSdkVersion was specified to 16.

PiperOrigin-RevId: 470004102
2022-09-30 17:05:23 +00:00
bachinger
acb48a2495 Remove deprecated calls
#minor-release

PiperOrigin-RevId: 452006137
2022-05-31 10:47:30 +00:00
olly
83daa052cb Rename TracksInfo and TrackGroupInfo
1. TracksInfo is renamed to Tracks
2. TracksInfo.TrackGroupInfo is renamed to Tracks.Group

PiperOrigin-RevId: 441232373
2022-04-26 14:30:14 +01:00
olly
f22025cc5e Simplify TracksInfo API
isTypeSupportedOrEmpty is very specific and a little hard to
understand unless you know the one thing it's useful for. This
commit replaces it with isTypeSupported, which can be used in
conjunction with the recently added containsType method.

PiperOrigin-RevId: 429312712
2022-02-17 16:15:14 +00:00
olly
47fd32f1d4 Fix spurious unsupported tracks toast in demo apps
PiperOrigin-RevId: 424062588
2022-01-25 19:22:30 +00:00
ibaker
bfce8f5456 Rename StyledPlayerView to PlayerView
This commit leaves some 'styled' references, specifically:
* exo_styled_XXX dimension names
* exo_styled_controls_XXX drawable IDs
* exo_styled_XXX color names
* ExoStyledControls.XXX style names

PiperOrigin-RevId: 421576554
2022-01-25 18:10:42 +00:00
ibaker
67a0e6d11c Fix javadoc reference to StyledPlayerView in cast demo app
This should have been done in
21e659ef8e

PiperOrigin-RevId: 411073049
2021-11-22 17:21:14 +00:00
ibaker
21e659ef8e Migrate the cast demo app from PlayerView to StyledPlayerView
StyledPlayerControlView can't really be used on its own (like
PlayerControlView was used here), so we instead use the same
StyledPlayerView instance for both local and casted playback,
replacing the content with a cast icon while casting.

PiperOrigin-RevId: 410764338
2021-11-19 15:05:55 +00:00
ibaker
686f2ca96d Migrate usages of Window-based Player methods
Where this introduced an inconsistency (e.g. assigning to something
called `windowIndex`), I generally renamed the transitive closure of
identifiers to maintain consistency (meaning this change is quite
large). The exception is code that interacts with Timeline and Window
directly, where sometimes I kept the 'window' nomenclature.

#minor-release

PiperOrigin-RevId: 407040052
2021-11-09 10:07:30 +00:00
ibaker
9a49a9ccda Remove all references to @NonNull
Our package-info.java files are annotated with @NonNullApi which results
in everything being non-null by default, so this annotation is never
needed.

#minor-release

PiperOrigin-RevId: 405864737
2021-10-27 17:48:40 +01:00
Andrew Lewis
933e207b3e Update to androidx.media3
PiperOrigin-RevId: 405656499
2021-10-27 09:12:46 +01:00
samrobinson
3c19850ed3 Migrate library usages of SimpleExoPlayer to ExoPlayer.
PiperOrigin-RevId: 402853522
2021-10-14 12:03:11 +01:00
krocard
98ee159df1 Use TracksInfo and selection override in users
Update the UI module, the demos and most other users
to make use of the new player TracksInfo and track
selection override APIs.

PiperOrigin-RevId: 402817857
2021-10-14 11:54:45 +01:00
olly
8a9dcadef3 README updates for misc modules
PiperOrigin-RevId: 402292139
2021-10-12 19:40:44 +01:00
olly
e7c6ed5e7f Mechanical README cleanups
PiperOrigin-RevId: 401767060
2021-10-09 18:14:36 +01:00
ibaker
f3fb03e663 Rollback of ce0cf23a7f
*** Original commit ***

Migrate callers of ExoPlayer.Builder#build() to buildExoPlayer()

An upcoming change will update build() to return Player.

***

PiperOrigin-RevId: 401453039
2021-10-07 21:50:01 +01:00
ibaker
ce0cf23a7f Migrate callers of ExoPlayer.Builder#build() to buildExoPlayer()
An upcoming change will update build() to return Player.

PiperOrigin-RevId: 399981901
2021-09-30 21:36:14 +01:00
ibaker
13827186aa Use the new MediaItem.Builder#setDrmConfiguration method
PiperOrigin-RevId: 397290953
2021-09-17 13:12:53 +01:00
olly
ef0bfa487f Remove previously deprecated DefaultHttpDataSourceFactory
NO_EXTERNAL

PiperOrigin-RevId: 391054962
2021-08-17 15:42:49 +01:00
kimvde
01613a2e55 Remove usages of deprecated SimpleExoPlayer.Builder
PiperOrigin-RevId: 390130681
2021-08-11 17:34:19 +01:00
olly
dea52048cb Bump dependency versions
PiperOrigin-RevId: 382277352
2021-06-30 13:53:01 +01:00
olly
7aaba1ffe5 Migrate usage of Player.EventListener to Player.Listener
PiperOrigin-RevId: 381837274
2021-06-30 13:43:51 +01:00
olly
d68dba6e34 Use relative naming for demo app components
PiperOrigin-RevId: 379506322
2021-06-15 18:46:45 +01:00
olly
6d3e9fc251 Include MediaSource deps in all demo apps
This is mainly so that developers can try out RTSP with
the main demo app without having to change the build.gradle
file.

The change also aligns what media can be played across the
different demo apps.

#minor-release

PiperOrigin-RevId: 373591974
2021-05-13 17:26:08 +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
4c1a294b2e Format Java source files
PiperOrigin-RevId: 372127633
2021-05-06 13:32:25 +01:00
samrobinson
3f3d1fb5f2 Change String MediaMetadata.title to CharSequence trackTitle.
PiperOrigin-RevId: 370439509
2021-04-26 18:29:01 +01:00
aquilescanta
1c40c75433 Use a debug signature config for demo apps' release variant
PiperOrigin-RevId: 359724874
2021-03-02 17:02:55 +00:00
bachinger
36cbcb30b6 Set explicit export attributes in all demo apps
Starting with Android 12 all components of an app that have an intent filter need to have an explicit attribute android:export that is set to either true or false. If a component filters for the MAIN or a VIEW action it needs the attribute explicitly set to true. Prior to Android 12 these were exported implicitly.

See https://medium.com/androiddevelopers/lets-be-explicit-about-our-intent-filters-c5dbe2dbdce0

PiperOrigin-RevId: 358368785
2021-02-22 10:34: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
bff7ac0dbe Clean up some lint warnings
PiperOrigin-RevId: 331162350
2020-09-11 17:31:03 +01:00
ibaker
2f19b63ca0 Add package-info files to packages that only exist in tests
This doesn't affect the nullness checker or Kotlin, but it does make
weird warnings appear in Android Studio. It seems mildly preferable to
have the same spurious warnings in these files that we have in other
tests, rather than different spurious warnings.

PiperOrigin-RevId: 321173760
2020-07-24 10:34:12 +01:00
olly
21e56f571d Misc analysis fixes
PiperOrigin-RevId: 320921457
2020-07-13 14:04:29 +01:00
andrewlewis
eddc2b0b33 Enable multidex for demos
This is necessary now we have Guava in debug (no-minified) apps.

Also switch to AndroidX multidex to remove the support library dependency.
Temporarily we need to add an Application class, as internal jetification
doesn't seem to handle declaring MultiDexApplication in AndroidManifest.xml.

issue:#7421
PiperOrigin-RevId: 313145023
2020-05-27 18:59:43 +01:00
olly
f38a1015ae Adding instructions on how to build and run ExoPlayer demo apps
Issue:#7338
PiperOrigin-RevId: 312470913
2020-05-21 17:08:53 +01:00
bachinger
b22783f895 Rename sourceUri to uri
PiperOrigin-RevId: 308918151
2020-05-01 19:46:04 +01:00
olly
2e51182f53 Update misc dependencies
PiperOrigin-RevId: 305503804
2020-04-08 21:49:03 +01:00
olly
376d02ac3f Upgrade cast dependency
Issue: #7191
PiperOrigin-RevId: 305502293
2020-04-08 21:48:45 +01:00
bachinger
777d99da8a simplify PlayerManager
PiperOrigin-RevId: 303170259
2020-03-27 23:31:29 +00:00