125 Commits

Author SHA1 Message Date
tonihei
b9a6a40539 Add listener callback for shuffle mode changes.
The listener implementations do not do anything yet.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166056933
2017-08-22 16:23:27 +01:00
tonihei
cb45a47da1 Remove isFirstWindow/isLastWindow from Timeline.
These methods are only used in one place, and offer duplicate
functionality to checking getNext(Previous)WindowIndex == C.INDEX_UNSET.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165910258
2017-08-22 16:14:02 +01:00
andrewlewis
cec0c52c8d Allow the app to specify extra ad markers
Issue: #3184

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165895259
2017-08-22 16:12:31 +01:00
olly
2470b39d95 Split metadata and text outputs from their renderer classes
There will be non-ExoPlayer players that can output text
and metadata, so the outputs should be standalone. There
may also be ExoPlayer instances that use non-standard
text and metadata renderers, for which this change also
makes sense.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165628420
2017-08-17 23:05:44 +01:00
olly
34960ad891 Tweak and add READMEs + remove refs to V1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165578518
2017-08-17 22:59:34 +01:00
olly
08d16c55d4 Some Leanback extension + minVersion bump fixes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165219604
2017-08-17 22:36:47 +01:00
Bei Yi
f764fe70b0 Support crop mode for AspectRatioFrameLayout 2017-08-17 11:01:42 -07:00
olly
40f34956a8 Bump minimum and target API levels + support lib version
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164863447
2017-08-11 15:01:43 +01:00
olly
88bae5d975 Support multiple video/text/metadata outputs
We've seen more than one issue filed where a developer has
registered a video listener and been confused by the fact
their SimpleExoPlayerView no longer works properly. There
are also valid use cases for having multiple metadata/text
outputs.

Issue: #2933
Issue: #2800
Issue: #2286
Issue: #2240

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164839882
2017-08-10 13:26:48 +01:00
olly
ebbf9f635b Fix minor Javadoc error
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164706078
2017-08-10 13:15:51 +01:00
eguven
427411befb Disable test coverage again
https://issuetracker.google.com/issues/37019591 causes local variables can't be found while debugging.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164449443
2017-08-07 13:38:15 +01:00
olly
b664e92bb4 Remove shuffle button since it doesn't work yet
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164141326
2017-08-04 12:36:39 +01:00
tonihei
53bc59b9d2 Add UI resources for shuffle mode.
Including strings, icon, and button.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164126101
2017-08-04 12:32:24 +01:00
olly
db99187381 Fix some lint warnings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164105662
2017-08-03 14:47:04 +01:00
Oliver Woodman
1a95a35434 Minor cleanup 2017-08-01 18:20:54 +01:00
olly
13513b9c3e Clean up MediaSessionExt documentation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163828712
2017-08-01 16:23:39 +01:00
ojw28
b562eb215f Merge pull request #3098 from dbrain/custom_playback_control_view
Allow PlaybackControlView to be overridden in SimpleExoPlayerView
2017-08-01 10:48:51 +01:00
olly
957158b7ff Fix 2.5.0 lint errors
- Publish IMA extension
- Force IMA to use the correct version of the support library
- Add missing sr translations for repeat mode strings

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163705883
2017-07-31 21:19:42 +01:00
olly
c2d7e05429 Propagate skipped input buffers through to CodecCounters
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163683081
2017-07-31 21:14:23 +01:00
aquilescanta
df562bc8d1 Fix PlaybackControlView's repeat mode button update when player is null
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162824522
2017-07-31 20:42:29 +01:00
Danny Brain
be85da3a69 Allow PlaybackControlView to be overridden in SimpleExoPlayerView 2017-07-26 11:34:49 +10:00
andrewlewis
554a399407 Switch to non-deprecated player constants
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162605429
2017-07-21 11:20:07 +01:00
aquilescanta
4f5ac9e04f Extract Player interface from ExoPlayer
This is the first step towards facilitating Cast integration to ExoPlayer.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162366198
2017-07-19 14:15:45 +01:00
bachinger
5be79d4f42 Media session extension to connect ExoPlayer with the MediaSession of the
framework.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162245883
2017-07-17 23:22:41 +01:00
olly
387720d182 Allow module registrations + log player release
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162223981
2017-07-17 23:21:34 +01:00
olly
0869802173 Show last seek position when playing an ad
We'd normally expect playback controls to be hidden during
ad playback, although if they are visible for whatever reason,
it makes sense to set the position to the current content
position now that we have it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161950098
2017-07-15 17:31:01 +01:00
andrewlewis
94683d1e8c Show ad markers for non-multi-window time bars
Ads don't have their own periods any more, so show ad group markers even if the
time bar is not multi-window.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161524411
2017-07-12 18:15:53 +01:00
olly
b31fd5bc7c Misc tweaks to UI components
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161454491
2017-07-12 18:10:25 +01:00
andrewlewis
4180b9656d Show played ad groups
By default played ad groups are shown faded out. This helps the user know
whether they will see an ad when they seek to a given position.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161098491
2017-07-10 12:07:35 +01:00
andrewlewis
1f815db367 Switch the IMA extension to use in-period ads
This also adds support for seeking in periods with midroll ads.

Remove Timeline.Period.isAd.

Issue: #2617

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160510702
2017-06-30 16:35:14 +01:00
andrewlewis
db11e3ddb6 Show larger scrubber handle when focused
Also remove updateScrubberState as it doesn't do anything useful.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160496133
2017-06-30 16:30:52 +01:00
olly
a543436b96 SimpleExoPlayerView/DefaultTimebar fixes
- Restore making the playback controls visible on any key press.
- Turn anti-aliasing on for drawing the scrubber circle. It looks
  really ugly on some devices if you don't do this.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160413777
2017-06-28 22:26:05 +01:00
andrewlewis
96fa660284 Expose ad playback information on ExoPlayer
Also update the time bar to show ad markers using in-period ads and
remove support for periods being marked as ads.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160382805
2017-06-28 22:26:05 +01:00
olly
4a59c7cf40 Make it easier to use ExoPlayer modules in other projects II
With this change, it becomes possible to depend on ExoPlayer
locally in settings.gradle by doing:

gradle.ext.exoplayerRoot = 'path/to/exoplayer/root'
apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle')

You can optionally add a prefix onto ExoPlayer's module names
by adding:

gradle.ext.exoplayerModulePrefix = 'prefix'

Issue: #2851
Issue: #2974

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160277967
2017-06-28 22:26:05 +01:00
olly
2a8eb5a2a1 Make it easier to use ExoPlayer modules in other projects
It's currently difficult to use ExoPlayer modules in other gradle
projects because they rely on constants and dependencies defined
in our own top level gradle file. This change moves the constants
into a separate file referenced directly from each module. It also
removes the need for the top level gradle file to declare a
dependency on com.novoda:bintray-release. This is now only needed
if "exoplayerPublishEnabled = true" is specified.

Issue: #2851
Issue: #2974

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160272072
2017-06-28 22:26:05 +01:00
Oliver Woodman
0f5c30d345 Misc cleanup 2017-06-13 13:35:10 +01:00
ojw28
c6dfccf393 Merge pull request #2756 from kiall/par-debugview
Include Pixel Aspect Ratio in DebugTextViewHelper
2017-06-13 13:21:01 +01:00
tonihei
fa4f876668 UI parameter to disable automatically showing playback controls.
(Fixing GitHub issue #2699)

Added controllerAutoShow parameter to decide whether playback controls are
shown automatically. Default is true. Can be overwritten in the XML with
auto_show=false or via SimpleExoPlayerView.setControllerAutoShow(false).

Also inverted the logic of maybeShowControllers and showController.
SimpleExoPlayerView.(show/hide)Controller and PlaybackControlView.(show/hide)
now unconditionally do what they say to allow manual operation.
SimpleExoPlayerView.maybeShowController is used internally to automatically
show playback controls.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158712277
2017-06-13 13:15:13 +01:00
Kiall Mac Innes
c24ef592e7 Include Pixel Aspect Ratio in DebugTextViewHelper
Add the video Pixel Aspect Ratio to the DebugTextViewHelper in order
to help debug issues related to PAR changes etc
2017-06-11 16:30:13 +01:00
olly
39b1c85c27 Expose current scrubber position through onScrubStart
Issue: #2910

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158149904
2017-06-06 18:11:58 +01:00
andrewlewis
bcd4bf0fd5 Fix DefaultTimeBar invalidation
Issue: #2871

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157562792
2017-05-31 11:42:24 +01:00
andrewlewis
84875bbe7b Constrain DefaultTimeBar maximum positions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156113616
2017-05-17 16:48:07 +01:00
andrewlewis
4963061923 Fix wrap_content handling in DefaultTimeBar
Issue: #2788

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155705318
2017-05-11 05:53:20 +01:00
andrewlewis
a6220b8be3 Handle control layouts with no repeat button
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155625893
2017-05-11 05:53:20 +01:00
tonihei
c70cd37c5a Repeat mode UI
Added repeat mode toggle buttons to UI. Current mode gets forwarded to
Exoplayer instance, but without playback behaviour changes yet.
Translations for button descriptions are also missing - this will be another CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155386549
2017-05-08 22:30:58 +01:00
tonihei
df0d1b0f8a Removed superfluous dots in russian translation of repeat modes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155386511
2017-05-08 22:29:52 +01:00
tonihei
ba9cbfbb91 Localized strings for repeat modes.
Related to GitHub Issue #2577.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155078753
2017-05-04 20:56:59 +01:00
tonihei
4d1826dd3d Add repeat mode mechanics to Exoplayer.
(Relating to GitHub Issue #2577)

All getter, setter and callbacks have been added and value of repeatMode is
passed to getNextXXXIndex methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155071985
2017-05-04 20:55:48 +01:00
andrewlewis
c3158d3e68 Improve DefaultTimeBar color customization
Add attributes for the scrubber handle color and unplayed color. If attributes
are missing, derive defaults from the played color.

Issue: #2740

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154825736
2017-05-04 20:50:05 +01:00
tonihei
6d2fa12e16 Add getNextWindowIndex to Timeline
(Preparation for Repeat Toggle Function - GitHub Issue #2577)

In addition, Timeline now also got a getPreviousWindowIndex and a
getNextPeriodIndex method with default implementations.

Changed ExoPlayerImplInternal and PlaybackControlView to use these
methods at all occurances of period and window index operations.

Note: Does not include repeat mode yet and no timelines are actually
using it so far. Please wait for the next CLs for this.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154520664
2017-05-04 20:45:31 +01:00