354 Commits

Author SHA1 Message Date
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
andrewlewis
9eff531c08 Use only HTTPS for external demo app media
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207881679
2018-08-13 13:44:29 +01:00
olly
4558eb4e99 Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207556225
2018-08-06 17:26:23 +01:00
hoangtc
b3d52f5d80 Add MetadataRetriever demo.
Add a demo app that shows case how to use APIs from MetadataRetriever to
retriever track groups and frames from some media.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207269221
2018-08-06 11:29:27 +01:00
eguven
45c1e9eef3 Add missing Nullable annotation Player.EventListener.onTimelineChanged
Issue: #4593

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206911927
2018-08-01 13:49:21 +01:00
andrewlewis
5715960304 Add Context to SimpleExoPlayer factory methods
This is needed for implementing (optional) support for audio focus handling in a
later change.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206899837
2018-08-01 13:49:21 +01:00
eguven
02e9972630 Add 360 video samples to the demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206747144
2018-08-01 13:49:20 +01:00
eguven
9c337c8806 Add monoscopic 360 surface type to PlayerView
Using this surface it's possible to play 360 videos in a non-VR Activity that is
affected by phone and touch input.

RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205720776
2018-07-24 14:54:05 +01:00
tonihei
5933d92394 Add simplified Dash and Ss media source factory constructors.
As the manifest and media data sources can be the same now, we can provide
a simplified constructor with just one data source factory.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205658046
2018-07-23 15:55:57 +01:00
tonihei
c24a699b34 Update demo apps to use player-provided default bandwidth meter.
This simplifies the player setup and prevents using deprecated methods in the demo.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205642981
2018-07-23 13:35:08 +01:00
eguven
7b2da629ea Make it possible to disable DownloadService notifications
Issue: #4389

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204728270
2018-07-17 20:27:30 +01:00
eguven
93cbae5bff Use default Deserializers if non given to DownloadManager
Also moved shared code to SegmentDownloadAction between its subclasses.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202294880
2018-06-28 16:18:50 +01:00