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
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
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
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
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
Also moved shared code to SegmentDownloadAction between its subclasses.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202294880
The DefaultEventListener was added for selective overrides. Now that Java 8
support is enabled, these selective listener overrides can be implemented
more easily and more flexible using default methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201695490
This happens when the device screen is locked.
This fixes a previous attempt to fix the problem.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199130325
The ACCESS_NETWORK_STATE permission is only included indirectly which doesn't
work in all build systems.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197399274
This type of flicker was visible (at least on my S8) whenever starting
the demo app process (from being properly killed) when other notifications
(e.g. completed download notification) was present.
This change passes whether the service was started as foreground through
the intent, and only applies the show-notification-on-stop hack if it
was. It's only necessary to start as foreground if your app is not already
in the foreground, so it's not necessary to do this from activity/ui
components.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195594930
If an app wants to reconcile its own state with that of a DownloadManager,
it's helpful to know when the DownloadManager has finished restoring any
previously persisted tasks.
Also suppress initial "state changed to paused" listener invocations for
tasks that are immediately started.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195594881
Also convert them to exposing periods and track groups, like
regular MediaSources do. This gets us much closer to being
able to use standard track selection components during offline
initialization. The helper is responsible for reverse mapping
selected tracks onto physical streams when generating the
download action. This is trivial except for the HLS case, which
is a TODO for now.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195500826
This may be preferable for using custom binary data,
and it's still easy to store Strings if needed.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195486817
- Made parts of DownloadActions public that were previously hidden.
This is necessary so that when an app is listening to the
DownloadManager, it can tell something about the tasks.
- Simplified DownloadActivity some more. The helpers may migrate
into their corresponding modules at some point, and also be
converted to return structured TrackGroupArrays rather than a
flat list of Formats.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195269824
Currently it's possible to copy a master playlist with a URL
that was never present in the original. This change prevents
this, and also moves the key more in line with DASH/SS.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195065286
Ad load errors will be forwarded as media source load errors in the future
and other ad events are not actually player related to warrant reporting
them as part of playback analytics.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194936656
This was adding a lot of code, and the multiple use cases
for Downloader was pretty confusing (in particular the
ordering of method calls was unclear). It's also not
performant (e.g. it requires loading/parsing manifest(s)
and initialization segments from disk).
In practice I think apps will need to keep a record of
what's offlined in their app's database (or equivalent),
which they can update by registering as a listener on
DownloadManager. This will be done for the demo app in
a subsequent change.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194932876
- It's much cleaner to split completed/error notification methods.
- Make error notification show the content title in the demo app.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194920507
This change is intended to resolve overloading of "Download",
where a DownloadTask could be an actual download task, or a
remove task.
Also cleaned up some documentation.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194815058
- Redefine Scheduler interface to better describe what implementations
do. The previous version was too general, in that it allowed concrete
DownloadService implementations to pass different Requirements to
the base class and to the Scheduler. It's also difficult to see how
that version could ever support dynamic updates to Requirements, which
is probably a feature we'll need to add quite soon.
- Fix a (probably theoretical) problem where static fields in
DownloadService assumed only a single concrete implementation.
- Stop using PlatformScheduler pre-API-21 in demo app, because it will
fail.
- Define default Requirements that require network.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194785751
This replaces the existing listeners and provides some additional meta data
for each event.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194770421
- Add ACCESS_NETWORK_STATE to core library. It seems fairly fundamental. We should
also be using it elsewhere (e.g. to fail fast if there's no network).
- Add annotation to force apps using PlatformScheduler to declare RECEIVE_BOOT_PERMISSION
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194763051
- When calculating the downloaded percentage in DASH, there was no
way to disambiguate between 0 of 0 segments being downloaded because
there are no cached indexes (i.e. 0% downloaded) and 0 of 0 segments
being downloaded because the index defines 0 segments (i.e. 100%
downloaded).
- Also replace use of NaN with a named constant.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194453202
This removes a fair chunk of code. The line delta would
be more negative if it not for adding all the /* x= */
comments in DashDownloadActionTest!
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194136689
This removes the need for separate String/Parcelable filter paths in
the demo app. Hopefully this is a temporary measure as we work
toward using track groups + consistent keys for all media types.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194065499