Minor guide cleanup for 2.14

#minor-release

PiperOrigin-RevId: 372980349
This commit is contained in:
olly 2021-05-10 19:57:08 +01:00 committed by Oliver Woodman
parent 763ef2b911
commit 9a2ebbb72e
2 changed files with 11 additions and 21 deletions

View File

@ -98,12 +98,9 @@ to prevent build errors.
## Creating the player ##
You can create an `ExoPlayer` instance using `SimpleExoPlayer.Builder` or
`ExoPlayer.Builder`. The builders provide a range of customization options for
creating `ExoPlayer` instances. For the vast majority of use cases
`SimpleExoPlayer.Builder` should be used. This builder returns
`SimpleExoPlayer`, which extends `ExoPlayer` to add additional high level player
functionality. The code below is an example of creating a `SimpleExoPlayer`.
You can create an `ExoPlayer` instance using `SimpleExoPlayer.Builder`, which
provides a range of customization options. The code below is the simplest
example of creating an instance.
~~~
SimpleExoPlayer player = new SimpleExoPlayer.Builder(context).build();
@ -224,9 +221,9 @@ on the player. Some of the most commonly used methods are listed below.
* `setShuffleModeEnabled` controls playlist shuffling.
* `setPlaybackParameters` adjusts playback speed and audio pitch.
If the player is bound to a `PlayerView` or `PlayerControlView`, then user
interaction with these components will cause corresponding methods on the player
to be invoked.
If the player is bound to a `StyledPlayerView` or `StyledPlayerControlView`,
then user interaction with these components will cause corresponding methods on
the player to be invoked.
## Releasing the player ##

View File

@ -177,19 +177,12 @@ generic `onEvents` callback, for example to record media item change reasons
with `onMediaItemTransition`, but only act once all state changes can be used
together in `onEvents`.
## SimpleExoPlayer listeners ##
## Using AnalyticsListener ##
When using `SimpleExoPlayer`, an additional listener can be registered with the
player.
* `addAnalyticsListener`: Listen to detailed events that may be useful for
analytics and logging purposes. Please refer to the [analytics page][] for
more details.
ExoPlayer's UI components, such as `StyledPlayerView`, will register themselves
as listeners to events that they are interested in. Hence manual registration
using the methods above is only useful for applications that implement their own
player UI, or need to listen to events for some other purpose.
When using `SimpleExoPlayer`, an `AnalyticsListener` can be registered with the
player by calling `addAnalyticsListener`. `AnalyticsListener` implementations
are able to listen to detailed events that may be useful for analytics and
logging purposes. Please refer to the [analytics page][] for more details.
### Using EventLogger ###