mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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
|
* Fix bug where streams with highly uneven durations may get stuck in a
|
||||||
buffering state
|
buffering state
|
||||||
([#7943](https://github.com/google/ExoPlayer/issues/7943)).
|
([#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:
|
* Track selection:
|
||||||
* Add option to specify multiple preferred audio or text languages.
|
* Add option to specify multiple preferred audio or text languages.
|
||||||
* Data sources:
|
* Data sources:
|
||||||
|
|
|
||||||
|
|
@ -618,6 +618,7 @@ public class SimpleExoPlayer extends BasePlayer
|
||||||
audioVolume = 1;
|
audioVolume = 1;
|
||||||
audioSessionId = C.AUDIO_SESSION_ID_UNSET;
|
audioSessionId = C.AUDIO_SESSION_ID_UNSET;
|
||||||
currentCues = Collections.emptyList();
|
currentCues = Collections.emptyList();
|
||||||
|
throwsWhenUsingWrongThread = true;
|
||||||
|
|
||||||
// Build the player and associated objects.
|
// Build the player and associated objects.
|
||||||
player =
|
player =
|
||||||
|
|
@ -1948,7 +1949,7 @@ public class SimpleExoPlayer extends BasePlayer
|
||||||
* Sets whether the player should throw an {@link IllegalStateException} when methods are called
|
* Sets whether the player should throw an {@link IllegalStateException} when methods are called
|
||||||
* from a thread other than the one associated with {@link #getApplicationLooper()}.
|
* 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.
|
* @param throwsWhenUsingWrongThread Whether to throw when methods are called from a wrong thread.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue