261 Commits

Author SHA1 Message Date
aquilescanta
be61715517 Fix Cast demo app
Broken in 399aa706a7

PiperOrigin-RevId: 242112068
2019-04-05 21:14:28 +01:00
olly
9471d61183 Fix ExoPlayer's demo app
PiperOrigin-RevId: 241811732
2019-04-05 21:13:31 +01:00
aquilescanta
9c0819001d Fix ExoPlayer's demo app gradle build
Broken by 399aa706a7.

PiperOrigin-RevId: 241770676
2019-04-05 21:12:54 +01:00
olly
399aa706a7 Remove usages of the widget package and migrate to new packages.
PiperOrigin-RevId: 241656157
2019-04-05 20:54:09 +01:00
olly
9aacef47ad Allow TrackSelectionDialog to indicate whether it has any content
PiperOrigin-RevId: 241523313
2019-04-05 20:49:25 +01:00
tonihei
28ea31cd4c Use Closeable interface for DownloadStateCursor to simplify closing.
PiperOrigin-RevId: 240775823
2019-03-29 16:50:57 +00:00
eguven
d4f5c9c721 Remove DownloadHelper.getRemoveAction
PiperOrigin-RevId: 240444051
2019-03-29 16:48:40 +00:00
eguven
3919f3843d Make DownloadManager use DownloadIndex
PiperOrigin-RevId: 240320220
2019-03-26 13:18:11 +00:00
eguven
b5e4523b58 Remove index modifier methods from DownloadIndex interface
PiperOrigin-RevId: 239045412
2019-03-20 23:26:49 +00:00
eguven
d85ee01ae7 Convert DownloadManager.Listener methods no-op default methods
PiperOrigin-RevId: 239019504
2019-03-20 23:26:49 +00:00
olly
07702cecdd Allow exoplayer/v2/ mockito2
PiperOrigin-RevId: 238625384
2019-03-20 23:26:10 +00:00
tonihei
d93ee00d19 Add convenience method to DownloadHelper to add selection for single renderer.
This simplifies the DownloadHelper code in the demo app and is generally
useful for more specific updates with SelectionOverrides.

PiperOrigin-RevId: 238228276
2019-03-15 04:53:29 +00:00
olly
ab5dae64b9 Make sure we handle SQLiteException and other IO errors properly
SQLiteException is a runtime exception, which makes it easy to
forget to handle it. This change converts SQLiteExceptions into
a checked exception, which is then handled appropriately.

PiperOrigin-RevId: 237038793
2019-03-06 17:29:18 +00:00
olly
a4754bb741 Don't show track selection tabs if there's only one
PiperOrigin-RevId: 237025639
2019-03-06 17:29:18 +00:00
tonihei
3500f07be6 Use theme overlay for track selection dialog.
We currrently just inherit the acitivity's alertDialogTheme style (which
is equivalent to ThemeOverlay.AppCompat.Dialog.Alert). Using the theme
overlay directly and also force-enable the title such that the title is
shown even if the activity disabled the title.

PiperOrigin-RevId: 237012601
2019-03-06 17:29:18 +00:00
tonihei
641c1d2af4 Properly release DownloadHelper and TrackSelectionDialog.
The release needs to post to the MediaSource thread and also needs to post
back to the DownloadHelper thread to prevent sending updates after release has
been called. The point where we release the downloadHelper also needs to
dismiss the dialog in case the creation has already been queued before the
release.

PiperOrigin-RevId: 236652309
2019-03-06 17:29:18 +00:00
olly
d68c861b21 Remove duplicate layout file
PiperOrigin-RevId: 236645446
2019-03-06 17:29:18 +00:00
tonihei
0624046a7b Stop using deprecated method in demo app.
PiperOrigin-RevId: 236133636
2019-03-06 17:29:18 +00:00
tonihei
f87cb81f35 Enable caching in internal demo app.
So far it's only enabled in the external demo app.

PiperOrigin-RevId: 236122825
2019-03-06 17:29:18 +00:00
tonihei
cde6189c14 Repair progressive downloads in DownloadTracker.
They are currently broken because we ignore downloads without periods.
As the DownloadHelper doesn't create periods for progressive media, we don't
download them. Fixing by starting download automatically without showing
track selection dialog.

PiperOrigin-RevId: 236120202
2019-03-06 17:29:18 +00:00
tonihei
84c8842dfa Prevent multiple track selection dialogs in PlayerActivity.
PiperOrigin-RevId: 236119640
2019-03-06 17:29:18 +00:00
olly
bfc60e1694 Set vertical orientation by default in TrackSelectionView
Horizontal orientation doesn't make sense. I thought about
overriding the setter to throw something, but it's probably
not worth the extra lines.

PiperOrigin-RevId: 234632530
2019-02-20 13:55:33 +00:00
olly
0622afe170 Migrate to androidx
Issue: #5489
PiperOrigin-RevId: 234507428

Add missing annotation dependency

Issue: #5489
PiperOrigin-RevId: 234566177
2019-02-19 13:22:54 +00:00
andrewlewis
f3bd93394b Fix copybara stripping
PiperOrigin-RevId: 234496529
2019-02-18 18:45:55 +00:00
tonihei
cedfa19988 Prevent using view state and use state saved in fragment instead.
The system may destroy views at any time and may not have created the view
at all. Use the state saved in the fragment to be independant of the existance
of the view.

PiperOrigin-RevId: 234156285
2019-02-18 17:40:48 +00:00
tonihei
c6195dbbaf Handle recreation of TrackSelectionView instances.
TrackSelectionView requires an initialization with a call to init(...).
That's why we shouldn't let the view retain its view hierarchy automatically
as the views won't be backed by data if restored. Instead add a listener
which lets the containing activity/fragment save and restore the state if
needed.

PiperOrigin-RevId: 234152491
2019-02-18 17:40:48 +00:00
tonihei
eae09c67e7 Release download helper if new download track selection is started.
PiperOrigin-RevId: 234128521
2019-02-18 17:40:48 +00:00
tonihei
1c38b226ea Stop using AlertDialog for TrackSelectionDialog.
AlertDialog owns its view, which causes problems with TabLayout on API 21
and 22. Now using AppCompatDialog instead so that we can own the view
ourselves.

Also:
 - Renamed layout files from download_xyz to track_selection_xyz.
 - Added OK and Cancel buttons to the view.
 - Applied alert dialog style to the "normal" dialog to get a nicer UI.
PiperOrigin-RevId: 233944647
2019-02-18 17:40:48 +00:00
aquilescanta
73d9b2d21a Hide ExoCastPlayer components again
This CL is effectively a rollback of cr/233072247.

PiperOrigin-RevId: 233793032
2019-02-18 17:40:48 +00:00
aquilescanta
5c2aa4bd9e Automated g4 rollback of changelist 233073011.
*** Reason for rollback ***

Pending discussions about cast

*** Original change description ***

Remove default-receiver-related classes from Cast demo app

***

PiperOrigin-RevId: 233790699
2019-02-18 17:40:48 +00:00
aquilescanta
cc153cfca3 Use floating action button in the cast demo app
PiperOrigin-RevId: 233723028
2019-02-18 17:40:48 +00:00
tonihei
ca67c0c2e5 Extend TrackSelectionDialog for usage in PlayerActivity.
We need additional initial selection settings and a configurable title.
The update logic for the track selection parameters moved to a static helper
method in TrackSelectionDialog.

PiperOrigin-RevId: 233713788
2019-02-18 17:40:48 +00:00
olly
c7788c18db Fix / cleanup some layout in the Cast demo
PiperOrigin-RevId: 233587404
2019-02-18 15:59:22 +00:00
tonihei
1dd36ae391 Add TrackSelectionDialog (with swipe tabs) to demo app.
PiperOrigin-RevId: 233582549
2019-02-18 15:59:07 +00:00
aquilescanta
00c31265cd Move depended below dependant as per usual
PiperOrigin-RevId: 233578341
2019-02-18 15:59:02 +00:00
aquilescanta
55e6d1d708 Prevent concurrent queue modifications from breaking the cast demo app UI
PiperOrigin-RevId: 233577854
2019-02-18 15:58:57 +00:00
olly
a21572f0dd Fix minor issues and lint errors
PiperOrigin-RevId: 233428556
2019-02-18 15:58:37 +00:00
olly
de720fef77 Add missing permission to IMA demo app
PiperOrigin-RevId: 233418784
2019-02-18 15:58:22 +00:00
andrewlewis
56944caa21 Allow registration of control overlays for ad viewability
Switch from passing an ad UI ViewGroup to passing an object that can also
provide information about controls overlays.

Also switch to using a dedicated overlay for ads instead of the overlay frame
layout, which apps have easy access to.

PiperOrigin-RevId: 233393500
2019-02-18 15:58:06 +00:00
olly
8401097ead Upgrade gradle plugin and friends
PiperOrigin-RevId: 233390513
2019-02-18 15:57:55 +00:00
aquilescanta
905927554a Fix Cast demo app's blaze build and enable proguarding
PiperOrigin-RevId: 233372668
2019-02-18 15:57:49 +00:00
tonihei
abb53d7ce7 Support multiple overrides in TrackSelectionView and factor out Builder.
Supporting multiple overrides allows to select tracks from multiple groups, if
enabled. As more options are added, the creation of the dialog is moved to a
separate builder class.

PiperOrigin-RevId: 233366282
2019-02-18 15:57:44 +00:00
aquilescanta
fc2710498a Handle player errors more gracefully in the Cast demo app
PiperOrigin-RevId: 233090773
2019-02-18 15:57:39 +00:00
aquilescanta
3d822bd228 Rename ExoCastPlayerManager to PlayerManager
PiperOrigin-RevId: 233089799
2019-02-18 15:57:34 +00:00
aquilescanta
a263fb1631 Remove default-receiver-related classes from Cast demo app
PiperOrigin-RevId: 233073011
2019-02-18 15:57:24 +00:00
aquilescanta
6f1daff3f1 Remove copybara scrubbing of ExoCast components
PiperOrigin-RevId: 233072247
2019-02-18 15:57:19 +00:00
andrewlewis
589af35c65 Set player on ads loader in IMA demo
Issue: #5476
PiperOrigin-RevId: 232503736
2019-02-06 15:45:34 +00:00
olly
e3981ec484 Fix notifications to avoid flicker on KitKat
On KitKat you need to reuse the same notification builder when
generating a notification that's intended to replace a previous
one. See:

https://stackoverflow.com/questions/6406730/updating-an-ongoing-notification-quietly

PiperOrigin-RevId: 232503682
2019-02-06 15:45:24 +00:00
eguven
a5d64463c7 Make DownloadTracker use DownloadIndex
DownloadTracker will stop updating DownloadIndex when DownloadManager
starts using the same DownloadIndex.

PiperOrigin-RevId: 232306803
2019-02-04 19:39:34 +00:00
aquilescanta
c61c0bd1ac Cast demo: Fix a few miscellaneous bugs
PiperOrigin-RevId: 231801562
2019-02-04 19:38:49 +00:00