Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don’t work double tap #29

Open
savva643 opened this issue Feb 28, 2023 · 2 comments
Open

Don’t work double tap #29

savva643 opened this issue Feb 28, 2023 · 2 comments

Comments

@savva643
Copy link

I try code from guide and add in Java this
YouTubeOverlay youTubeOverlay = getView().findViewById(R.id.youtube_overlay);
youTubeOverlay.performListener(new YouTubeOverlay.PerformListener() {
 @Override
 public void onAnimationStart() {
 youTubeOverlay.setVisibility(View.VISIBLE);
 }

 @Override
 public void onAnimationEnd() {
 youTubeOverlay.setVisibility(View.GONE);
 }
});
XML:
<com.keeppixel.kompot.CustomPlayerView
 android:id="@+id/videoView2"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 app:show_timeout="0"
 app:hide_on_touch="true"
 app:player_layout_id="@layout/playerview"
 android:animateLayoutChanges="true"
 app:controller_layout_id="@layout/contollervidfull"
 app:layout_constraintStart_toStartOf="parent"
 app:layout_constraintTop_toTopOf="parent"
 app:dtpv_controller="@+id/youtube_overlay" />

<com.github.vkay94.dtpv.youtube.YouTubeOverlay
 android:id="@+id/youtube_overlay"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:visibility="invisible"
 app:layout_constraintTop_toTopOf="@id/videoView2"
 app:layout_constraintBottom_toBottomOf="@id/videoView2"
 app:layout_constraintStart_toStartOf="@id/videoView2"
 app:layout_constraintEnd_toEndOf="@id/videoView2"
 app:yt_playerView="@+id/videoView2" />
But double top don’t work.

@yoobi
Copy link

yoobi commented Apr 27, 2023

Seems like you forgot something: https://github.com/vkay94/DoubleTapPlayerView#getting-started

// Uncomment this line if you haven't set yt_playerView in XML
youtube_overlay.playerView(playerView)
  
// Uncomment this line if you haven't set dtpv_controller in XML 
// playerView.controller(youtube_overlay)

// Call this method whenever the player is released and recreated
youtube_overlay.player(simpleExoPlayer)

@savva643
Copy link
Author

Unfortunately, this don't work. I try use code from ready project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants