79 Commits

Author SHA1 Message Date
olly
c49ae53699 Remove unnecessary dependency
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176487991
2017-11-21 13:15:00 +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
hdmoon
30f95cdcac Remove shuffleMode(boolean) usages in ExoPlayer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173645536
2017-10-27 16:27:05 +01:00
aravinds
ac9233b7f8 Update v27.0.0 from git_oc-mr1-release with build id #4399904 & SL from ub-supportlib-27.0 with build id #4397392 to Android stable channel
Branch: git_oc-mr1-release & ub-supportlib-27.0
  Release: 27.0.0
  Build ID: 4399904 & 4397392
  Channel: stable
  Version: 8.1.0

  Global presubmit: []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173351372
2017-10-27 16:09:11 +01:00
tonihei
52de36c5eb Add abstract, default Player event listener.
This allows simplified listener implementations as most listeners
will not listen to all possible notifications.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170177821
2017-10-03 08:44:33 +01:00
tonihei
7d59383cc4 Add reason to onPositionDiscontinuity.
This allows listeners to easily determine the source of the discontinuity.
Reasons can be period transitions, seeks, and internal reasons.

Listeners still using the deprecated ExoPlayer.EventListener interface were
updated to Player.EventListener.

GitHub: #3252

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168549612
2017-09-15 23:36:46 +01:00
andrewlewis
e16610a82c Fix import formatting
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167584287
2017-09-06 15:44:01 +01:00
bachinger
84c13ccbf3 Support setRepeatMode (and move shuffle action to PlaybackController)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167013507
2017-08-31 16:31:10 +01:00
bachinger
01f4819844 Introduce MediaSessionConnector.CommandReceiver interface and add TimelineQueueEditor.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166475351
2017-08-29 23:00:03 +01:00
bachinger
1305b1155b Migrate MediaSessionConnector to API 26 for shuffle mode.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166198698
2017-08-29 22:49:28 +01:00
tonihei
bd81181892 Add shortcut methods to query next or previous window index.
This functionality is most likely needed by UI modules which currently need
to obtain the timeline, the current repeat and shuffle modes and are only then
able to query the next/previous window index using this information.

Adding these methods simplifies these cumbersome requests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166181202
2017-08-29 22:40:13 +01:00
tonihei
10f1bd7396 Add shuffle mode parameter to Timeline interface methods.
This parameter is used by methods such as getNextWindowIndex
and getPreviousWindowIndex to determine the playback order.
Additionally, there are method to query the first and last
window index given the shuffle mode.

None of the timeline implementations nor the ExoPlayer
implementation supports shuffling so far.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166170229
2017-08-29 22:37:27 +01:00
tonihei
6a8c99d037 Support shuffle mode in MediaSessionConnector.
Changes to the player's shuffle mode are forwarded to the media session.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166057425
2017-08-22 16:24:45 +01:00
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
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
bachinger
ab277675a1 set mediaSession flags properly and keep queue in sync when timeline changes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164774783
2017-08-10 13:21:47 +01:00
olly
b6b84839ed Add ErrorMessageProvider to util package
It's needed in multiple places. MediaSessionConnector uses it
today. Our leanback connector will also use it. Maybe
SimpleExoPlayerView should use one too, to show the message to
the user when an error occurs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164720020
2017-08-10 13:19:12 +01:00
olly
98d50c13ef Clean up terminology for MediaSession extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164705750
2017-08-10 13:14:27 +01:00
olly
d4c45861f4 Clean up extension READMEs
Issue: #1157

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164434768
2017-08-07 11:54:21 +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
eguven
cdb71a80aa Remove empty line after copyright text
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163186057
2017-07-31 20:52:49 +01:00
bachinger
6f600a8fa5 Take care playback preparer and queue navigator can not register overlapping
playback actions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162736210
2017-07-21 16:10:10 +01:00
bachinger
3bc3900dba Do not update queue when the queue did not actually change to avoid
unnecessary updates are broadcasted to all clients.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162728670
2017-07-21 16:08:45 +01:00
olly
94b08b27e9 Fix MediaSession gradle file to use modulePrefix
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162610352
2017-07-21 11:21:46 +01:00
bachinger
8d56f904a0 make MediaSessionConnector depend only to the Player interface
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162604746
2017-07-21 11:18:42 +01:00
olly
19087a7fa0 Fix broken Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162601961
2017-07-21 11:16:01 +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
olly
4fd516e35b Make MediaSessionConnector depend only on ExoPlayer
This is possible to do without passing the player instance to
custom action providers through their constructors, given we
no longer have a MuteActionProvider. Passing the player through
the constructors generalizes better to such cases, however, so
feels like the right thing to do.

It's also possible to use generics and keep passing the player
instance via the CustomActionProvider methods, but this adds
some unnecessary complexity.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162333043
2017-07-19 14:03:38 +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