339 Commits

Author SHA1 Message Date
bachinger
10690630bf allow an app to force an update of the player notification
Issue:#4379

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201497585
2018-06-22 17:36:33 +01:00
Brandon Davis
4b6edc5785 Fix CaptioningManager background being shown behind cue background.
remove extra space
2018-06-22 08:12:41 -06:00
Itay Kinnrot
cd9041c089 Parse the label of audio and text from stream and add it to Format type + add it to default ui + update from dev-v2 2018-06-19 11:32:04 +03:00
olly
0e4cb52979 Don't show player controls unless key press is handled
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=200991862
2018-06-18 15:40:40 +01:00
olly
9eedb8e855 Add isControllerVisible
Issue: #4385

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=200986828
2018-06-18 15:39:20 +01:00
ojw28
eef986bf0c
Merge pull request #4384 from Khang-NT/fix_document
Correct document of PlayerView & PlayerControlView
2018-06-18 05:23:10 -07:00
tonihei
c1181000f9 Correctly report buffered position for multi-period window.
Currently only the buffered position in the current media period can be queried.

To achieve this, we save the buffered positions of all MediaPeriods to the
PlaybackInfo together with a list of MediaPeriodIds. ExoPlayerImpl can then
determine the correct buffered position for multi-period windows and windows
with midroll ads.

In addition, this change adds two new convenience methods to the Player interface
to query the total buffered duration across all windows and to get the buffered
duration of the content while playing an ad.

Issue:#4023

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=200041791
2018-06-18 11:08:22 +01:00
olly
b408de9ad9 Fix incorrect padding application
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199683216
2018-06-18 10:56:33 +01:00
Khang NT
3a99f965bd Correct document of PlayerView & PlayerControlView
Change R.id to R.layout
2018-06-15 00:49:27 +07:00
tonihei
841ce9df71 Fix track selection nullability issues.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199266768
2018-06-05 12:45:55 +01:00
tonihei
27f009d239 Enable Java 8 support.
This enables compiler support for Java 8 features.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198709705
2018-06-05 12:29:14 +01:00
hoangtc
1541354819 Support TTML font size using % correctly.
For TTML, if the font size is expressed in %, the font size should be relative
to the cellResolution of the document which we did not support before. This CL
adds support for handling this correctly.
Note that this still does not support font size using c unit.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196985694
2018-05-18 15:04:55 +01:00
andrewlewis
e23392a4fe Update views when a new track name provider is set
Also update TrackSelectionView with nullness annotations.

Issue: #4263

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196849706
2018-05-18 15:04:55 +01:00
hoangtc
24b16f3419 Fix a bug with TTML font styling that displays empty lines.
If the caption line has no text (empty line or only line break), we should not
display its background.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196823319
2018-05-18 15:04:55 +01:00
tonihei
b3c3717007 Prevent NPE in PlayerNotificationManager.
The app can set the player to null while messages from the player are still
in flight. This may cause NPEs.

Issue:#4238

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196504077
2018-05-18 14:23:55 +01:00
olly
1af9334188 Add option to keep content visible in PlayerView when player is reset
Issue: #2843

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196349533
2018-05-12 18:58:21 +01:00
andrewlewis
b779b1599f Support setting some DefaultTimeBar attributes
Issue: #4207

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196059445
2018-05-12 18:50:39 +01:00
ojw28
9adf9542e1
Merge pull request #4175 from cdotchen/FixDefaultTimeBar
Fix timebar scrubber notify wrong start position
2018-05-09 13:52:32 -07:00
tonihei
81c3769880 Add missing @Nullable to equals implementations.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195947382
2018-05-09 21:23:45 +01:00
olly
b9aaf1ebab Improve offline support in the demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195593235
2018-05-07 07:22:53 +01:00
olly
dbd768fbd7 Fix selection item
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195544030
2018-05-07 07:16:27 +01:00
olly
fdbea33a14 Improve track naming when sampleMimeType unset
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195346555
2018-05-07 06:58:23 +01:00
andrewlewis
a0b3fb4e87 Clarify not using 'and' as the item separator
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195282481
2018-05-07 06:56:11 +01:00
tonihei
5a1431c904 Turn on automatic nullness check for DASH.
Also add a build rule to simplify the test setup with a custom blacklist.
In addition, the test path pattern are made less specific to capture all the
static nullness tests in the /main/ directories.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195230334
2018-05-07 06:50:52 +01:00
olly
b23eabd939 Add error and buffering views to PlayerView
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195203362
2018-05-07 06:49:47 +01:00
olly
c466fabb1c Use integers for HLS rendition keys
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
2018-05-07 06:47:40 +01:00
olly
59c620c23c Clean up offline notifications
- 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
2018-05-07 06:41:12 +01:00
andrewlewis
5d3c080f06 Fix NPE on tapping download notification
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194902748
2018-05-07 06:40:09 +01:00
andrewlewis
880ce3f59a Add content intent for download notifications
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194882787
2018-05-07 06:38:50 +01:00
olly
fedf8dd5c1 Make download notification more informative when removing downloads
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194827787
2018-05-07 06:35:38 +01:00
olly
7723f5bdf1 Clean up offline class names
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
2018-05-07 06:34:16 +01:00
olly
9c15c63d4e Add util method for starting foreground services
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194761771
2018-05-07 06:25:40 +01:00
olly
85384cf45b Add extra context to strings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194691625
2018-05-07 06:24:29 +01:00
hoangtc
ed994517b2 Changes MetadataRetrieverTest to use a TestRunner.
Add a TestRunner for MetadataRetriever that roughly follow the test runner for
ExoPlayer. The TestRunner supports scheduling test steps in a sequence, compare
expected callbacks with actual callbacks, and block the test until it is done.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194518738
2018-05-07 06:22:03 +01:00
olly
3e76464666 Fix download percentage reporting
- 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
2018-05-07 06:20:59 +01:00
olly
6ac252843e Move TrackSelectionHelper to UI module
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194373357
2018-05-07 06:17:46 +01:00
olly
b77d6c4ef4 Remove Downloader.ProgressListener
ProgressiveDownloader never implemented this properly, and we
don't use it in DownloadManager/DownloadService, both of which
use a polling model. A polling model is also what's used elsewhere,
for example to query the current playback position.

This is effectively doing the TODO in ProgressiveDownloader.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194214579
2018-05-07 06:13:24 +01:00
olly
b6f646ed96 Clean up DownloadAction instances
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
2018-05-07 06:11:49 +01:00
tonihei
874dc202f8 Prevent timeline access in AnalyticsCollector for future windows and periods.
Some of the events are emitted by the media periods itself and their index may
not be available in the publicly accessible timeline yet.

To prevent this, we currently check for timeline.isEmpty() only. But this may
also happen for dynamic changes, e.g. when new sources are added in fast
succession and a manifest for one of the new sources starts loading before the
updated timeline is reported.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194057401
2018-05-07 06:07:29 +01:00
bachinger
301bb3ada4 add flag to hide play/pause button
exoghi/4056

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193960004
2018-05-07 06:05:16 +01:00
andrewlewis
ddd603a1ee Add DownloadService constructor for notification channel
Also move NotificationUtil from the UI module to the core module.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193941401
2018-05-07 06:02:07 +01:00
olly
adc77fd0b1 Simplify & clean up offline support in demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193938140
2018-05-07 05:58:59 +01:00
bachinger
e0af050163 add notification priority for lower API levels
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193934212
2018-05-07 05:57:53 +01:00
olly
d3cdf52591 Sanitize MappedTrackInfo API
Issue: #3915

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193897041
2018-05-07 05:53:05 +01:00
andrewlewis
30e040a48d Add @DrawableRes for player notification manager icon
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193670840
2018-05-07 05:50:50 +01:00
andrewlewis
9de4e5d7ac Make MediaDescriptionAdapter the last argument
If the caller wants to pass an anonymous inner class for the media description
adapter, this results in slightly more readable code.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193666444
2018-05-07 05:49:45 +01:00
olly
a1b8aa1514 Adding useful track selection strings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193663850
2018-05-07 05:47:33 +01:00
andrewlewis
b125d79ed6 Add a convenience constructor for a notification manager + channel
Also fix duplicate action strings when using a custom stop action, and do some
misc no-op cleanup.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193652377
2018-05-07 05:44:57 +01:00
andrewlewis
117dd6f33f Mark optional parameters @Nullable
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193530582
2018-05-07 05:39:18 +01:00
andrewlewis
8bbdb1b143 Add an @IntDef for notification channel importance
This is to avoid callers needing to do an API check or suppress inlined constant
warnings.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193476188
2018-05-07 05:32:40 +01:00