Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9a2ebbb7
authored
May 10, 2021
by
olly
Committed by
Oliver Woodman
May 10, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Minor guide cleanup for 2.14
#minor-release PiperOrigin-RevId: 372980349
parent
763ef2b9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
21 deletions
docs/hello-world.md
docs/listening-to-player-events.md
docs/hello-world.md
View file @
9a2ebbb7
...
@@ -98,12 +98,9 @@ to prevent build errors.
...
@@ -98,12 +98,9 @@ to prevent build errors.
## Creating the player ##
## Creating the player ##
You can create an
`ExoPlayer`
instance using
`SimpleExoPlayer.Builder`
or
You can create an
`ExoPlayer`
instance using
`SimpleExoPlayer.Builder`
, which
`ExoPlayer.Builder`
. The builders provide a range of customization options for
provides a range of customization options. The code below is the simplest
creating
`ExoPlayer`
instances. For the vast majority of use cases
example of creating an instance.
`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`
.
~~~
~~~
SimpleExoPlayer player = new SimpleExoPlayer.Builder(context).build();
SimpleExoPlayer player = new SimpleExoPlayer.Builder(context).build();
...
@@ -224,9 +221,9 @@ on the player. Some of the most commonly used methods are listed below.
...
@@ -224,9 +221,9 @@ on the player. Some of the most commonly used methods are listed below.
*
`setShuffleModeEnabled`
controls playlist shuffling.
*
`setShuffleModeEnabled`
controls playlist shuffling.
*
`setPlaybackParameters`
adjusts playback speed and audio pitch.
*
`setPlaybackParameters`
adjusts playback speed and audio pitch.
If the player is bound to a
`
PlayerView`
or
`PlayerControlView`
, then user
If the player is bound to a
`
StyledPlayerView`
or
`StyledPlayerControlView`
,
interaction with these components will cause corresponding methods on the player
then user interaction with these components will cause corresponding methods on
to be invoked.
t
he player t
o be invoked.
## Releasing the player ##
## Releasing the player ##
...
...
docs/listening-to-player-events.md
View file @
9a2ebbb7
...
@@ -177,19 +177,12 @@ generic `onEvents` callback, for example to record media item change reasons
...
@@ -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
with
`onMediaItemTransition`
, but only act once all state changes can be used
together in
`onEvents`
.
together in
`onEvents`
.
##
SimpleExoPlayer listeners
##
##
Using AnalyticsListener
##
When using
`SimpleExoPlayer`
, an additional listener can be registered with the
When using
`SimpleExoPlayer`
, an
`AnalyticsListener`
can be registered with the
player.
player by calling
`addAnalyticsListener`
.
`AnalyticsListener`
implementations
are able to listen to detailed events that may be useful for analytics and
*
`addAnalyticsListener`
: Listen to detailed events that may be useful for
logging purposes. Please refer to the
[
analytics page
][]
for more details.
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.
### Using EventLogger ###
### Using EventLogger ###
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment