381 Commits

Author SHA1 Message Date
aquilescanta
cc153cfca3 Use floating action button in the cast demo app
PiperOrigin-RevId: 233723028
2019-02-18 17:40:48 +00:00
tonihei
ca67c0c2e5 Extend TrackSelectionDialog for usage in PlayerActivity.
We need additional initial selection settings and a configurable title.
The update logic for the track selection parameters moved to a static helper
method in TrackSelectionDialog.

PiperOrigin-RevId: 233713788
2019-02-18 17:40:48 +00:00
olly
c7788c18db Fix / cleanup some layout in the Cast demo
PiperOrigin-RevId: 233587404
2019-02-18 15:59:22 +00:00
tonihei
1dd36ae391 Add TrackSelectionDialog (with swipe tabs) to demo app.
PiperOrigin-RevId: 233582549
2019-02-18 15:59:07 +00:00
aquilescanta
00c31265cd Move depended below dependant as per usual
PiperOrigin-RevId: 233578341
2019-02-18 15:59:02 +00:00
aquilescanta
55e6d1d708 Prevent concurrent queue modifications from breaking the cast demo app UI
PiperOrigin-RevId: 233577854
2019-02-18 15:58:57 +00:00
olly
a21572f0dd Fix minor issues and lint errors
PiperOrigin-RevId: 233428556
2019-02-18 15:58:37 +00:00
olly
de720fef77 Add missing permission to IMA demo app
PiperOrigin-RevId: 233418784
2019-02-18 15:58:22 +00:00
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
aquilescanta
905927554a Fix Cast demo app's blaze build and enable proguarding
PiperOrigin-RevId: 233372668
2019-02-18 15:57:49 +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
aquilescanta
fc2710498a Handle player errors more gracefully in the Cast demo app
PiperOrigin-RevId: 233090773
2019-02-18 15:57:39 +00:00
aquilescanta
3d822bd228 Rename ExoCastPlayerManager to PlayerManager
PiperOrigin-RevId: 233089799
2019-02-18 15:57:34 +00:00
aquilescanta
a263fb1631 Remove default-receiver-related classes from Cast demo app
PiperOrigin-RevId: 233073011
2019-02-18 15:57:24 +00:00
aquilescanta
6f1daff3f1 Remove copybara scrubbing of ExoCast components
PiperOrigin-RevId: 233072247
2019-02-18 15:57:19 +00:00
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