215 Commits

Author SHA1 Message Date
andrewlewis
589af35c65 Set player on ads loader in IMA demo
Issue: #5476
PiperOrigin-RevId: 232503736
2019-02-06 15:45:34 +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
eguven
a5d64463c7 Make DownloadTracker use DownloadIndex
DownloadTracker will stop updating DownloadIndex when DownloadManager
starts using the same DownloadIndex.

PiperOrigin-RevId: 232306803
2019-02-04 19:39:34 +00:00
aquilescanta
c61c0bd1ac Cast demo: Fix a few miscellaneous bugs
PiperOrigin-RevId: 231801562
2019-02-04 19:38:49 +00:00
olly
45433869e5 Rename ExtractorMediaSource to ProgressiveMediaSource
It better describes what the class does. More importantly, we've had
inconsistent class names since we added offline support, for which we
added ProgressiveDownloader ("ExtractorDownloader" doesn't make any
sense). We could really do with aligning the names for clarity.

(Sorry)

PiperOrigin-RevId: 231387268
2019-01-29 16:45:42 +00:00
tonihei
71d77d7fa0 Remove DownloadHelper subclasses and use static methods instead.
The subclasses only call specific constructor combinations and can easily
replaced by static methods.

PiperOrigin-RevId: 231385606
2019-01-29 16:45:10 +00:00
tonihei
0a8ae74217 Update DownloadHelper to use MediaSource and MediaPeriod directly.
This requires to prepare the media source and the periods in a small helper similar
to the metadata retriever. It also gets rid of the need to have abstract protected
methods to load the manifest, to extract the track groups and to convert to stream keys,
as this can now be handled by the media period.

PiperOrigin-RevId: 231385590
2019-01-29 16:44:56 +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
aquilescanta
fd081d49c7 Make the Cast demo app absorb remote queue changes
Necessary in two scenarios:
+ When the demo app starts casting to a receiver app that already
  had a queue.
+ When two demo apps are connected to the same receiver app and
  both make modifications.

PiperOrigin-RevId: 230546851
2019-01-29 16:41:02 +00:00
aquilescanta
52f25f6ea8 Add HLS stream and remove non-working content from Cast demo app
PiperOrigin-RevId: 230496581
2019-01-29 16:40:31 +00:00
olly
de3a749b97 Fix scheduler NPE in DownloadService
PiperOrigin-RevId: 230260266
2019-01-29 16:40:09 +00:00
aquilescanta
6a55fda66d Add DRM protected content to the Cast demo APP
Allows testing DRM-protected content in the receiver app.

Includes the DRM-related data to the media items, but does not
add support for DRM content in the local player yet.

PiperOrigin-RevId: 229932329
2019-01-21 12:56:53 +00:00
eguven
ec77f737ee Make DownloadManager watch requirements directly
PiperOrigin-RevId: 229544734
2019-01-17 14:37:12 +00:00
tonihei
e4ad90efd0 Set Player separately in AdsLoader interface.
Passing the player through MediaSource.prepare is only needed for the AdsLoader
and complicates other usages of MediaSource. Providing the player directly to
the AdsLoader is also in line with the usage pattern of PlayerView and other
components.

Also rename methods to start/stop to better reflect their usage.

PiperOrigin-RevId: 227682112
2019-01-08 07:33:52 +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
aquilescanta
f4fd3b12e6 Handle failure to get Cast context more gracefully
Issue:#4160
Issue:#4743
PiperOrigin-RevId: 225813243
2018-12-18 19:45:48 +00:00
tonihei
173ddd6ee7 Add simplified adaptive media source stream key filter to factory classes.
This change only simplifies the API by using the ManifestParser internally.

PiperOrigin-RevId: 225516193
2018-12-14 15:42:36 +00:00
eguven
41f76bdb53 Convert DownloadState id to String
For now this id can not be set by client but auto generated using
content cache key and uri.

PiperOrigin-RevId: 225356645
2018-12-14 15:41:18 +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
tonihei
272a5e59f2 Use download icon instead of play icon for download notification.
PiperOrigin-RevId: 225001681
2018-12-14 15:39:24 +00:00
tonihei
6a6b211233 Update DownloadHelper constructors and their usage in the demo app.
PiperOrigin-RevId: 224797598
2018-12-10 18:17:52 +00:00
aquilescanta
73da205279 Add receiver flavor to CastDemo
PiperOrigin-RevId: 224310086
2018-12-10 18:17:41 +00:00
aquilescanta
891961d5e1 Revert usage of MediaItems for Cast demo sample list
PiperOrigin-RevId: 224308973
2018-12-10 18:08:56 +00:00
andrewlewis
19a6f904e5 Reformat cast DemoUtil
PiperOrigin-RevId: 222978255
2018-11-27 15:46:04 +00:00
olly
e317305909 Remove custom data from remove actions
A remove action will eventually just be the unique ID of the download
that should be removed. This is a step toward that goal.

PiperOrigin-RevId: 222832456
2018-11-27 15:45:38 +00:00
olly
03101444af Update content url for IMA demo app
The existing one seems to be dead, and isn't https.

PiperOrigin-RevId: 222795996
2018-11-26 11:05:44 +00:00
tonihei
f8a3c135e5 Use overflow-save add operation for blacklisting duration.
This allows to specify open-ended blacklisting with Long.MAX_VALUE.

PiperOrigin-RevId: 222550939
2018-11-23 12:31:12 +00:00
olly
6ebb6124bb Offline refactor step 1a - Make DownloadAction concrete
1. Pull up all subclasses of DownloadAction into DownloadAction
2. Add DownloaderFactory for Downloader instantiation, and DefaultDownloaderFactory
   to replace the instantiation logic being removed from the DownloadAction
   subclasses.

This change will upgrade existing action files gracefully (i.e. it does not
lose compatibility with the existing offline implementation, other than some
minor breaking changes to the API).

TODOs:

1. Move test methods from the XDownloadActionTest classes into DownloadActionTest.
   This will be done in a subsequent CL. There's a lot of consolidation that can
   be done here, including de-duplicating some of the test code added in this CL.
2. Look at merging DownloaderConstructorHelper into DefaultDownloaderFactory.
3. Use customCacheKey in DASH/HLS/SS Downloaders, for completeness.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222258983
2018-11-22 12:39:37 +00:00
andrewlewis
bc5e12013b Remove executable bit from some resources
Copybara propagates this bit on the files, so removing it avoids some
unnecessary changes in the first migrated commit.

Also losslessly optimize two PNG files.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220268951
2018-11-07 17:57:42 +00:00
aquilescanta
80e9c84a9e Remove RemotePlayer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217708323
2018-10-18 23:39:51 +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
aquilescanta
34c286682e Extract PlayerManager interface in the Cast demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215389291
2018-10-03 22:04:20 +01:00
aquilescanta
2a50621118 Use media item in the cast demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214750185
2018-09-27 17:46:27 +01:00
aquilescanta
776ad20a50 Add a MediaQueue abstraction to the cast extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214598078
2018-09-27 17:41:10 +01:00
tonihei
e25b7d2148 Add wrapper for Log messages to allow settig the log level.
Currently there is no way to disable (or reduce) the logcat output generated
by ExoPlayer.

Issue:#4665

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213421072
2018-09-20 12:12:21 +01:00
olly
62532f9a2e Revert accidental change to media.exolist.json
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212790665
2018-09-13 18:41:51 +01:00
olly
a5a7e988e3 Clip DASH periods to their durations
Issue: #4185

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212619419
2018-09-12 15:30:47 +01:00
aquilescanta
da88b34687 Fix HLS advanced TS and fMP4 sample streams
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211976724
2018-09-12 15:01:29 +01:00
olly
924a76d532 Clean up use of deprecated APIs
- Add @Deprecated on overrides of deprecated method.
- Suppress deprecation warnings where appropriate.
- Use non-deprecated alternatives where appropriate.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210092434
2018-08-24 16:12:44 +01:00
eguven
14c7c2995c Add android.permission.FOREGROUND_SERVICE
Apps targeting P or later now must request this permission in order to
use foreground services.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209762160
2018-08-24 15:51:58 +01:00
eguven
02a8964fe2 Support VR180 videos
If available parse and use spherical metadata:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209754080
2018-08-24 15:44:24 +01:00
aquilescanta
8927993b03 Prevent a Demo app NPE on Android TV
The options menu is not available on Android TV, which triggers a
null pointer exception whenever a sample is chosen.

This CL is a temporary fix until we rework the UI to not use
an options menu.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209742076
2018-08-24 15:38:17 +01:00
aquilescanta
f64ec43acd Remove usage of deprecated method from the Demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209390036
2018-08-24 15:22:40 +01:00
olly
bd8a956d53 Use lamdas everywhere
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209162373
2018-08-24 15:19:30 +01:00
olly
ab72dd44ed Move decoder and ABR preferences to overflow menu
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208977806
2018-08-16 16:43:26 +01:00
andrewlewis
5f75d6ea13 Target API 28
Apps targeting API 28 by default do not grant permission for cleartext traffic,
so update the demo app to show a warning if loading an HTTP URI will fail. See
https://developer.android.com/about/versions/pie/android-9.0-changes-28 for
information on behavior changes in API 28.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208204937
2018-08-13 14:04:14 +01:00
olly
bac597cb07 Update dependencies + misc fixes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208195761
2018-08-13 14:02:51 +01:00
andrewlewis
93f591be3e Release ads loader on new intent in the demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208056265
2018-08-13 13:56:28 +01:00
eguven
fc9c851601 Fix media.exolist.json format
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208006056
2018-08-13 13:47:05 +01:00