- 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
Also move NotificationUtil from the UI module to the core module.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193941401
- This is needed to make DefaultTrackSelector properly thread
safe, and enable atomic changes to the selector that, for
example, disable a renderer and enable another one at the same
time.
- This change also saves/restores parameters and the start
position in PlayerActivity, resolving the ref'd issue.
Issue: #3915
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193913350
This will help with removing selection factories from
SelectionOverride. It doesn't seem worth the effort to
have this togglable and in the UI of our demo app.
This change will also:
- Help to move TrackSelectionHelper into the UI module,
since it removes the part that's obviously debug-only.
- Make it possible to specify the ABR algorithm for each
sample, which might be nice as we start implementing
more of them.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192760196
Fix bug which causes the PlayerActivity to finish whenever the
android.permission.READ_EXTERNAL_STORAGE permission is requested.
A better solution would involve not requesting permissions if a
previous request is still pending. This would involve keeping
extra state in the activity, so this solution is used to keep
the demo app's complexity at a minimum.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192588821
Also added an assertion to the DRM event dispatcher to cause
immediate failure when this happens. This is consistent with
the assertion in the equivalent MediaSource class.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191892735
To be immediately rolled back after submission
Submitting on behalf of cblay.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191128111
A merge error in a previous change removed the drmSessionManager from
the player factory call.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190769364
Doing that in the current order may result in cases where we have a player
instance but a null media source and thus the next call to initializePlayer
will fail.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190765633
This will allow SimpleExoPlayer to auto-register its own listener before the
drm session manager is used to set-up the renderers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190478174
This is achieved by automatically registering a listener for child sources in
compositions. The composite media source has the chance to correct the
reported window index and media period id in the MediaLoadData of the events.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189575414
We had these specified directly in AndroidManifest.xml due to
our internal build setup. This change makes our internal build
re-write AndroidManifest.xml to dynamically insert the required
values, meaning they no longer need specifying in each manifest.
Bonus 1: Internally built demo apps now include the CL number at
which they're built in the version name :).
Bonus 2: Removes lint warning that complains min/target SDK
values in the manifest are redundant.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188489115
This is achieved by moving the listener registration and the creation of the
event dispatcher into BaseMediaSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188461932