use of in.testpress.course.util.ExoPlayerUtil in project android-sdk by testpress.
the class ExoPlayerActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.testpress_exo_player_view);
PlayerView playerView = findViewById(R.id.exo_player_view);
int matchParent = ConstraintLayout.LayoutParams.MATCH_PARENT;
playerView.setLayoutParams(new ConstraintLayout.LayoutParams(matchParent, matchParent));
findViewById(R.id.exo_fullscreen_button).setVisibility(View.GONE);
String url = getIntent().getStringExtra(VIDEO_URL);
float startPosition = getIntent().getFloatExtra(START_POSITION, 0);
float speedRate = getIntent().getFloatExtra(SPEED_RATE, 1);
FrameLayout exoPlayerMainFrame = findViewById(R.id.exo_player_main_frame);
exoPlayerUtil = new ExoPlayerUtil(this, exoPlayerMainFrame, url, startPosition, true, speedRate);
exoPlayerUtil.openOnlyInFullScreen();
}
Aggregations