mirror of
https://github.com/samsonjs/media.git
synced 2026-04-05 11:15:46 +00:00
Change default of throwsWhenUsingWrongThread to true
Apps can still opt out for now, but this option will be removed in the future. Issue: #4463 PiperOrigin-RevId: 333489424
This commit is contained in:
parent
a92ccb0184
commit
294ae10ef1
2 changed files with 6 additions and 1 deletions
|
|
@ -6,6 +6,10 @@
|
|||
* Fix bug where streams with highly uneven durations may get stuck in a
|
||||
buffering state
|
||||
([#7943](https://github.com/google/ExoPlayer/issues/7943)).
|
||||
* Verify correct thread usage in `SimpleExoPlayer` by default. Opt-out is
|
||||
still possible until the next major release using
|
||||
`setThrowsWhenUsingWrongThread(false)`
|
||||
([#4463](https://github.com/google/ExoPlayer/issues/4463)).
|
||||
* Track selection:
|
||||
* Add option to specify multiple preferred audio or text languages.
|
||||
* Data sources:
|
||||
|
|
|
|||
|
|
@ -618,6 +618,7 @@ public class SimpleExoPlayer extends BasePlayer
|
|||
audioVolume = 1;
|
||||
audioSessionId = C.AUDIO_SESSION_ID_UNSET;
|
||||
currentCues = Collections.emptyList();
|
||||
throwsWhenUsingWrongThread = true;
|
||||
|
||||
// Build the player and associated objects.
|
||||
player =
|
||||
|
|
@ -1948,7 +1949,7 @@ public class SimpleExoPlayer extends BasePlayer
|
|||
* Sets whether the player should throw an {@link IllegalStateException} when methods are called
|
||||
* from a thread other than the one associated with {@link #getApplicationLooper()}.
|
||||
*
|
||||
* <p>The default is {@code false}, but will change to {@code true} in the future.
|
||||
* <p>The default is {@code true} and this method will be removed in the future.
|
||||
*
|
||||
* @param throwsWhenUsingWrongThread Whether to throw when methods are called from a wrong thread.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue