mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Only set experimentalSetForegroundModeTimeoutMs value when it's > 0
PiperOrigin-RevId: 345489364
This commit is contained in:
parent
2980354510
commit
0f64ace515
2 changed files with 5 additions and 3 deletions
|
|
@ -239,7 +239,7 @@ public interface ExoPlayer extends Player {
|
||||||
*
|
*
|
||||||
* <p>This method is experimental, and will be renamed or removed in a future release.
|
* <p>This method is experimental, and will be renamed or removed in a future release.
|
||||||
*
|
*
|
||||||
* @param timeoutMs The time limit in milliseconds, or 0 for no limit.
|
* @param timeoutMs The time limit in milliseconds.
|
||||||
*/
|
*/
|
||||||
public Builder experimentalSetForegroundModeTimeoutMs(long timeoutMs) {
|
public Builder experimentalSetForegroundModeTimeoutMs(long timeoutMs) {
|
||||||
setForegroundModeTimeoutMs = timeoutMs;
|
setForegroundModeTimeoutMs = timeoutMs;
|
||||||
|
|
@ -457,7 +457,9 @@ public interface ExoPlayer extends Player {
|
||||||
looper,
|
looper,
|
||||||
/* wrappingPlayer= */ null);
|
/* wrappingPlayer= */ null);
|
||||||
|
|
||||||
player.experimentalSetForegroundModeTimeoutMs(setForegroundModeTimeoutMs);
|
if (setForegroundModeTimeoutMs > 0) {
|
||||||
|
player.experimentalSetForegroundModeTimeoutMs(setForegroundModeTimeoutMs);
|
||||||
|
}
|
||||||
if (!throwWhenStuckBuffering) {
|
if (!throwWhenStuckBuffering) {
|
||||||
player.experimentalDisableThrowWhenStuckBuffering();
|
player.experimentalDisableThrowWhenStuckBuffering();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ import java.util.concurrent.TimeoutException;
|
||||||
* <p>This method is experimental, and will be renamed or removed in a future release. It should
|
* <p>This method is experimental, and will be renamed or removed in a future release. It should
|
||||||
* only be called before the player is used.
|
* only be called before the player is used.
|
||||||
*
|
*
|
||||||
* @param timeoutMs The time limit in milliseconds, or 0 for no limit.
|
* @param timeoutMs The time limit in milliseconds.
|
||||||
*/
|
*/
|
||||||
public void experimentalSetForegroundModeTimeoutMs(long timeoutMs) {
|
public void experimentalSetForegroundModeTimeoutMs(long timeoutMs) {
|
||||||
internalPlayer.experimentalSetForegroundModeTimeoutMs(timeoutMs);
|
internalPlayer.experimentalSetForegroundModeTimeoutMs(timeoutMs);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue