use of com.google.android.exoplayer2.DefaultLoadControl.Builder in project ExoPlayer by google.
the class ExoPlayerTest method addSurfaceSwitch.
// Internal methods.
private static ActionSchedule.Builder addSurfaceSwitch(ActionSchedule.Builder builder) {
final Surface surface1 = new Surface(new SurfaceTexture(/* texName= */
0));
final Surface surface2 = new Surface(new SurfaceTexture(/* texName= */
1));
return builder.executeRunnable(new PlayerRunnable() {
@Override
public void run(ExoPlayer player) {
player.setVideoSurface(surface1);
}
}).executeRunnable(new PlayerRunnable() {
@Override
public void run(ExoPlayer player) {
player.setVideoSurface(surface2);
}
});
}
Aggregations