use of com.google.android.exoplayer.VideoSurfaceView in project edx-app-android by edx.
the class PlayerDemoActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mainHandler = new Handler(getMainLooper());
builder = getRendererBuilder();
setContentView(R.layout.activity_player_demo);
ViewGroup root = (ViewGroup) findViewById(R.id.root);
root.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View arg0, MotionEvent arg1) {
if (arg1.getAction() == MotionEvent.ACTION_DOWN) {
toggleControlsVisibility();
}
arg0.performClick();
return true;
}
});
mediaController = new EPlayerController(this);
mediaController.setAnchorView(root);
shutterView = findViewById(R.id.shutter);
surfaceView = (VideoSurfaceView) findViewById(R.id.surface_view);
surfaceView.getHolder().addCallback(this);
}
Aggregations