Add method to check if tunneling is enabled.
Issue: google/ExoPlayer#2518 PiperOrigin-RevId: 460482615
This commit is contained in:
parent
6922bd58ee
commit
549496f1fa
@ -9,6 +9,9 @@
|
|||||||
([#9889](https://github.com/google/ExoPlayer/issues/9889)).
|
([#9889](https://github.com/google/ExoPlayer/issues/9889)).
|
||||||
* For progressive media, only include selected tracks in buffered position
|
* For progressive media, only include selected tracks in buffered position
|
||||||
([#10361](https://github.com/google/ExoPlayer/issues/10361)).
|
([#10361](https://github.com/google/ExoPlayer/issues/10361)).
|
||||||
|
* Add `ExoPlayer.isTunnelingEnabled` to check if tunneling is enabled for
|
||||||
|
the currently selected tracks
|
||||||
|
([#2518](https://github.com/google/ExoPlayer/issues/2518)).
|
||||||
* Extractors:
|
* Extractors:
|
||||||
* Add support for AVI
|
* Add support for AVI
|
||||||
([#2092](https://github.com/google/ExoPlayer/issues/2092)).
|
([#2092](https://github.com/google/ExoPlayer/issues/2092)).
|
||||||
|
@ -1696,4 +1696,14 @@ public interface ExoPlayer extends Player {
|
|||||||
*/
|
*/
|
||||||
@UnstableApi
|
@UnstableApi
|
||||||
boolean experimentalIsSleepingForOffload();
|
boolean experimentalIsSleepingForOffload();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether <a
|
||||||
|
* href="https://source.android.com/devices/tv/multimedia-tunneling">tunneling</a> is enabled for
|
||||||
|
* the currently selected tracks.
|
||||||
|
*
|
||||||
|
* @see Player.Listener#onTracksChanged(Tracks)
|
||||||
|
*/
|
||||||
|
@UnstableApi
|
||||||
|
boolean isTunnelingEnabled();
|
||||||
}
|
}
|
||||||
|
@ -1682,6 +1682,17 @@ import java.util.concurrent.TimeoutException;
|
|||||||
streamVolumeManager.setMuted(muted);
|
streamVolumeManager.setMuted(muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTunnelingEnabled() {
|
||||||
|
verifyApplicationThread();
|
||||||
|
for (RendererConfiguration config : playbackInfo.trackSelectorResult.rendererConfigurations) {
|
||||||
|
if (config.tunneling) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* package */ void setThrowsWhenUsingWrongThread(boolean throwsWhenUsingWrongThread) {
|
/* package */ void setThrowsWhenUsingWrongThread(boolean throwsWhenUsingWrongThread) {
|
||||||
this.throwsWhenUsingWrongThread = throwsWhenUsingWrongThread;
|
this.throwsWhenUsingWrongThread = throwsWhenUsingWrongThread;
|
||||||
}
|
}
|
||||||
|
@ -1258,6 +1258,12 @@ public class SimpleExoPlayer extends BasePlayer
|
|||||||
player.setDeviceMuted(muted);
|
player.setDeviceMuted(muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTunnelingEnabled() {
|
||||||
|
blockUntilConstructorFinished();
|
||||||
|
return player.isTunnelingEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
/* package */ void setThrowsWhenUsingWrongThread(boolean throwsWhenUsingWrongThread) {
|
/* package */ void setThrowsWhenUsingWrongThread(boolean throwsWhenUsingWrongThread) {
|
||||||
blockUntilConstructorFinished();
|
blockUntilConstructorFinished();
|
||||||
player.setThrowsWhenUsingWrongThread(throwsWhenUsingWrongThread);
|
player.setThrowsWhenUsingWrongThread(throwsWhenUsingWrongThread);
|
||||||
|
@ -412,4 +412,9 @@ public class StubExoPlayer extends StubPlayer implements ExoPlayer {
|
|||||||
public boolean experimentalIsSleepingForOffload() {
|
public boolean experimentalIsSleepingForOffload() {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTunnelingEnabled() {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user