106 Commits

Author SHA1 Message Date
olly
67cde97a70 Move code unrelated to mapping to DefaultTrackSelector
Issue: #3915

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192759210
2018-04-16 10:47:55 +01:00
aquilescanta
7d0067e298 Fix external storage read permissions bug
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
2018-04-16 10:33:27 +01:00
olly
03a36ce6ba Fix NPE cause by demo app adding null listener to drm manager
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
2018-04-08 16:39:57 +01:00
olly
fa1856942b Add proguard configuration for Cast demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191442704
2018-04-03 18:49:21 +01:00
olly
62aea5857c Remove view index adjustment for retry button (which no longer exists)
Issue: #4059

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191414566
2018-04-03 15:33:59 +01:00
danarapagna
6380f26a7f Temp fix for b/77315136: Don't lock or check cache directories in SimpleCache
To be immediately rolled back after submission

Submitting on behalf of cblay.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191128111
2018-04-03 15:27:26 +01:00
eguven
e12f890dee Fix NPE in PlayerActivity while playing a playlist
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190787884
2018-03-29 13:42:14 +01:00
tonihei
db475fea86 Add back accidentally deleted parameter in PlayerActivity.
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
2018-03-29 13:37:14 +01:00
tonihei
e228947831 Check for failure cases in demo app before instantiating player and source.
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
2018-03-29 13:33:48 +01:00
tonihei
3cbe91a3b0 Pass DrmSessionManager through SimpleExoPlayer.
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
2018-03-28 00:43:07 +01:00
tonihei
40947d52f0 Support multiple DefaultDrmSessionManager listeners.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190236842
2018-03-28 00:34:25 +01:00
eguven
522f8c8a99 Make demo app play content from download cache
It's inserted before HttpDataSource as read only.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189815245
2018-03-28 00:22:15 +01:00
eguven
764d18f68f Add ability to play filtered manifests in PlayerActivity
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189796293
2018-03-28 00:20:27 +01:00
tonihei
e3a90a44b7 Support media source events for composite media sources.
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
2018-03-28 00:06:58 +01:00
olly
0b182d1849 Remove versions from IMA demo manifest that are now specified via gradle
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189000217
2018-03-27 23:44:38 +01:00
aquilescanta
18b1ec7a2f Recreate the cast media queue whenever the timeline is cleared
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188871914
2018-03-13 15:42:24 +00:00
olly
0e756b0e71 Centralize version and target sdk constants
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
2018-03-12 15:20:51 +00:00
tonihei
8f952162ff Allow multiple media source event listeners.
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
2018-03-12 15:15:34 +00:00
tonihei
c0c11af29f Reuse media sources in demo apps.
Especially the cast demo app benefits from this feature as it can keep its
ConcatenatingMediaSource all the time without having to repopulate it
when switching players.

Issue:#3498

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187866048
2018-03-07 15:12:50 +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
tonihei
2f4a3d2e5d Replace ConcatenatingMediaSource with DynamicConcatenatingMediaSource.
The non-dynamic media source has a strict subset of features of the dynamic one and
thus can be replaced.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187299432
2018-03-02 09:16:00 +00:00
ojw28
dc34ff2e6b
Merge pull request #3771 from reudismam/dev-v2
Use the pattern "string literal".equals(something) to prevent NPE …
2018-02-27 11:24:29 +00:00
olly
69496eb17e Bump to 2.7.0 and prepare release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186200840
2018-02-19 13:24:51 +00:00
andrewlewis
aa63ad3af0 Handle LOG AdEvents for ad group load errors.
If IMA loads an empty VAST document for an ad group it notifies via a LOG
AdEvent. Handle the event by updating the AdPlaybackState accordingly.

The error state will be handled in ExoPlayerImplInternal in a separate change.

Issue: #3584

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184516585
2018-02-08 14:49:00 +00:00
olly
696ebf3ded Suppress proguard notes about unresolved classes
In the case of the components we deliberately access via
reflection, it's normal that they might not be resolved
due to proguarding (i.e. if the app isn't being built to
include them). Don't note their omission.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184120611
2018-02-01 15:24:00 +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
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
aquilescanta
e7ba2caf47 Clear the media queue and stop casting on app pause
Simplifies the app and prevents inconsistent states between
both players and the media queue.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183831329
2018-02-01 15:04:54 +00:00
olly
1f6d161d4d Fix proguard configurations
1. When we try and load something via reflection and find the
   class, always throw rather than failing silently if we
   subsequently fail to instantiate an instance. This is
   indicative of a broken proguard setup, and failing silently
   makes it hard to spot.
2. Add library/core proguard configuration to ensure extension
   renderer constructors that we access via reflection are kept.
3. Add demos/main proguard configuration to ensure ImaAdsLoader
   constructor that we access via reflection is kept.
4. Added IMA proguard file to hopefully fix #3723, although I
   wasn't actually able to reproduce the issue.

Issue: #3723

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183648187
2018-02-01 14:52:16 +00:00
reudismam
a3891f6f5a Use the pattern ''string literal''.equals(something) to prevent NPE as it is done in many other locations in the codebase. 2018-01-30 12:50:20 -03:00
olly
5dff21e5de Remove part of DemoUtil from demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183056883
2018-01-24 10:34:56 +00:00
eguven
aa1b41bf2f Generalize parameter type in DemoApplication build methods
Instead of DefaultBandwidthMeter, TransferListener<? super DataSource>
is used.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182785785
2018-01-23 19:27:41 +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
68387f98ee Simplify demo app by moving EventLogger into core
It seems good to have EventLogger available from the library.
In particular because when app developers use it and then
submit bug reports, it makes it much easier to work out what
happened. It will also allow EventLogger to be used across
our (now multiple) demo apps.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182389407
2018-01-23 19:03:31 +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
olly
7b534cd9fd Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181962471
2018-01-23 18:35:20 +00:00
Oliver Woodman
141f3aa836 Simplify PGS captions + sync with internal tree 2018-01-15 14:13:30 +00:00
andrewlewis
f20c158a38 Fix IMA sample ad tag URL
Issue: #3703

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181947101
2018-01-15 12:01:15 +00:00
tonihei
f977ba256f Add ad insertion discontinuity reason.
This it to distinguish between actual period transitions and the
transitions occuring to and from ads within one timeline period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181606023
2018-01-15 11:50:15 +00:00
aquilescanta
11bae0af5a Add minimal logging for SCTE-35 splice commands in the Demo App
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181440439
2018-01-15 11:43:19 +00:00
andrewlewis
67d4626701 Add support for non-Extractor content MediaSources in IMA demo
Issue: #3676

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181140929
2018-01-15 11:29:11 +00:00
olly
d9bee4d29c Bump version to 2.6.1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179227114
2017-12-15 20:47:57 +00:00
andrewlewis
a4ae206ebe Support non-extractor ads in AdsMediaSource and demo apps
Issue: #3302

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178615074
2017-12-12 19:17:58 +00:00
andrewlewis
8c7fe8a258 Make ExtractorMediaSource.Builder a factory for ExtractorMediaSources
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178605481
2017-12-12 19:15:14 +00:00
andrewlewis
ba32d95dc4 Make HlsMediaSource.Builder a factory for HlsMediaSources
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178384204
2017-12-12 19:11:08 +00:00
andrewlewis
8947950b52 Make SsMediaSource.Builder a factory for SsMediaSources
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178380856
2017-12-12 19:09:46 +00:00
andrewlewis
e419154b86 Make DashMediaSource.Builder a factory for DashMediaSources
This is in preparation for supporting non-extractor MediaSources for ads in
AdsMediaSource.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178377627
2017-12-12 19:08:25 +00:00
andrewlewis
2f6a497d44 Use mappedTrackInfo local
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178216750
2017-12-12 18:54:36 +00:00
andrewlewis
fd938fb454 Update internal usages of deprecated AdaptiveMediaSourceEventListener
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177786580
2017-12-04 17:38:11 +00:00
andrewlewis
fbccdf594a Use AdaptiveMediaSourceEventListener for ExtractorMediaSource
This is a step towards harmonizing the MediaSource Builders and (potentially)
providing MediaSource factories.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177783157
2017-12-04 17:38:11 +00:00