354 Commits

Author SHA1 Message Date
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
eguven
a8e16f3cfe Simplify DownloadService notification requirements
This makes DownloadService easier to use in general and when only single
notification is used for all downloads.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193165982
2018-05-07 05:29:20 +01:00
olly
e99b8802eb Update translations
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193044028
2018-05-07 05:27:02 +01:00
olly
45ed7c304c Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193016758
2018-05-07 05:25:36 +01:00
cdotchen
693fe2841d fix timebar scrubber notify wrong start position 2018-04-24 22:08:30 +08:00
Oliver Woodman
d4eb2e5b85 Resync internal/external codebases 2018-04-16 11:36:59 +01:00
andrewlewis
60aecdf3b3 Expose setExtraAdGroupMarkers on PlayerView
Issue: #4097

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192100000
2018-04-11 00:23:10 +01:00
tek
26cb32ab6a Migrating to new "android" handler from deprecated "androidlocalizer".
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191788495
2018-04-08 16:39:57 +01:00
olly
1648e4e9f9 Don't call getLayoutDirection before API level 17
Weirdly, the Android Javadoc indicates that it returns something
before the API level on which the same Javadoc states it was added.
In any case, we can simply not call the method to avoid the
warning, since we only use the value if the API level is at least
23 anyway.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190941776
2018-03-29 17:58:38 +01:00
olly
2b9b2510dc Fix Javadoc generation + Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190916130
2018-03-29 13:57:09 +01:00
eguven
e13789bfcc Hide internal DownloadManager states
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188481259
2018-03-12 15:19:16 +00:00
bachinger
afd11de57d add a PlayerNotificationManager to post media style notifications.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188352116
2018-03-12 15:12:09 +00:00
eguven
380ec82881 Update PlayerView javadoc
Added a note about using TextureView only on hardware accelerated window.

Issue: #3901

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187498594
2018-03-02 09:26:16 +00:00
hoangtc
a3c8062e52 Add support for listening to AspectRatioFrameLayout's aspect ratio update
Currently, AspectRatioFrameLayout may need to resize itself if it could not
satisfy a target aspect ratio. User may want to know when this happen, or
whether this can happen, so they can update their UI accordingly. For
example: show/hide a button to toggle different resize mode only when the
aspect ratio of the view and the content is very different.

GitHub: #3736

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187484241
2018-03-02 09:24:41 +00:00
hoangtc
fcb796a80c Migrate ExoPlayer Gradle build files.
- Change 'compile' configuration (deprecared) to using 'implementation'
and 'api' configurations instead.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187311778
2018-03-02 09:20:02 +00:00
olly
77ec24ca58 Translation console import
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185409304
2018-02-16 11:47:49 +00:00
eguven
fc7a6d2596 Increase character limit for download notification strings
This is requested for Romanian translation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185359071
2018-02-16 11:45:27 +00:00
eguven
0e51a77839 Add message parameter to DownloadNotificationUtil.createNotification
DownloadNotificationUtil should not use getData().

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185002149
2018-02-16 11:38:11 +00:00
eguven
b3da82dc1c Open source DownloadService, DownloadManager and related classes
Issue: #2643

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184844484
2018-02-08 14:47:54 +00:00
olly
a7d4d2d21c Automated g4 rollback of changelist 184056034.
*** Reason for rollback ***

Broke everything

*** Original change description ***

Clean up message naming in EPII

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184061352
2018-02-01 15:13:51 +00:00
olly
fd10a3cbb0 Fix initial visibility of PlayerControlView
This applies when PlayerControlView is used as a standalone
component (not inside PlayerView). Previously hideAtMs was
set to 0, which caused the view to be immediatley hidden in
onAttachedToWindow. After this change the first time the view
is attached to the window is effectively treated as a "user
interaction" for the purposes of deciding when to timeout.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184056324
2018-02-01 15:12:23 +00:00
olly
2f932bfaf7 Clean up message naming in EPII
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184056034
2018-02-01 15:11:00 +00:00
olly
0c67a5783f Add descriptions for strings.
For our strings to be translated, we're required to provide
added context in the form of a description, and specify a
maximum length for the translated strings.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183651515
2018-02-01 14:56:18 +00:00
hoangtc
205055a01f Update ExoPlayer PlayerView, add zoom mode for PlayerView xml attributes
Since AspectRatioFrameLayout supports zoom mode as another resize_mode,
PlayerView's resize mode xml attribute should include this as well.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183237663
2018-02-01 14:17:10 +00:00
eguven
10879e32ba Add DownloadNotificationHelper
Helper class to create notifications for downloads using DownloadManager.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183225948
2018-02-01 14:15:40 +00:00
bachinger
32f8c2e907 add strings and drawables for fullscreen button
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182512582
2018-01-23 19:09:19 +00:00
olly
4828f275c7 Make play button behave differently in IDLE and ENDED states
- In IDLE, the button will now call a preparer. This allows
  removal of the separate retry button from the demo app.
- In ENDED, the button will seek back to the default position
  and play.
- Behavior is made consistent with LeanbackPlayerAdapter.

Issue: #3689

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182506855
2018-01-23 19:07:52 +00:00
olly
c577d9d351 Let SimpleExoPlayerView/LeanbackPlayerAdapter bind with any Player
Also sanitize naming (PlayerView/PlayerControlView).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182364487
2018-01-23 19:00:20 +00:00
aquilescanta
515fdf3bfd Allow extension of DebugTextViewHelper
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181970955
2018-01-23 18:39:37 +00:00
hoangtc
5364962dca Automatically apply rotation for TextureView in SimpleExoPlayer.
If SimpleExoPlayer is using TextView as output, we can handle video rotation by
automatically applying a matrix transformation to the TextureView when we have
this information available from the video (from video's metadata).

GitHub: #91

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180925571
2018-01-15 11:20:41 +00:00
olly
a314db04ad Reformat UI classes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180777553
2018-01-04 15:52:32 +00:00
hoangtc
bb8c608795 Make updating showTimeoutMs takes effect immediately.
Update PlaybackControlView and SimpleExoPlayerView so when showTimeoutMs is set
while the controller is shown, the new timeout takes effect immediately.

GitHub: #3554

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179171727
2017-12-15 12:16:41 +00:00
olly
435686f969 Add missing attrs to SimpleExoplayerView
They worked without being present in the declare-styleable,
but they need to be present for Android Studio auto-complete
to suggest them.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179047478
2017-12-15 12:08:24 +00:00
andrewlewis
aa01fb85dc Add an option to turn off hiding controls during ads
Issue: #3532

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178372763
2017-12-12 19:07:02 +00:00
olly
a155edc568 Hide subtitles when switching player in SimpleExoPlayerView
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177941993
2017-12-12 18:39:14 +00:00
tonihei
aac53cac56 Add reason to onTimelineChanged.
Currently onTimelineChanged doesn't allow to distinguish easily between the
different reasons why it's being called. Especially, finding
out whether a new media source has been prepared or the current source
refreshed dynamically was impossible without tightly coupling the player
operations with the listener.

The new reasons provide this disdinction by either indicating a newly
initialized media source, a dynamic update to an existing timeline
or manifest, or a reset of the player (which usually results in an
empty timeline).

The original onTimelineChanged method without reason is kept in the
DefaultEventListener as deprecated to prevent the need to update all
existing listeners in one go.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176478701
2017-11-21 13:07:46 +00:00