-
Notifications
You must be signed in to change notification settings - Fork 37
Description
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.