Skip to content

Commit

Permalink
Clarify threading requirements for the player in the doc.
Browse files Browse the repository at this point in the history
This makes the requirement that all calls are made on one thread more
explicit and also mentions this in the Getting Started guide.

Issue:#4278

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198694579
  • Loading branch information
tonihei authored and ojw28 committed Jun 5, 2018
1 parent 9852af7 commit 2813c06
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@
* model">
*
* <ul>
* <li>It is strongly recommended that ExoPlayer instances are created and accessed from a single
* application thread. The application's main thread is ideal. Accessing an instance from
* multiple threads is discouraged as it may cause synchronization problems.
* <li>Registered listeners are called on the thread that created the ExoPlayer instance, unless
* the thread that created the ExoPlayer instance does not have a {@link Looper}. In that
* case, registered listeners will be called on the application's main thread.
* <li>ExoPlayer instances must be accessed from a single application thread. This must be the
* thread the player is created on if that thread has a {@link Looper}, or the application's
* main thread otherwise.
* <li>Registered listeners are called on the thread the player is created on if that thread has a
* {@link Looper}, or the application's main thread otherwise. Note that this means registered
* listeners are called on the same thread which must be used to access the player.
* <li>An internal playback thread is responsible for playback. Injected player components such as
* Renderers, MediaSources, TrackSelectors and LoadControls are called by the player on this
* thread.
Expand Down

0 comments on commit 2813c06

Please sign in to comment.