Just tried to changed style of youtube player id for maximised panel and minimised. However when I drag panel up and down i never see corresponding log messages.
private void hookDraggablePanelListeners() {
draggablePanel.setDraggableListener(
new DraggableListener() {
@Override
public void onMaximized() {
playVideo();
youtubePlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.DEFAULT);
Toast.makeText(getActivity(),"Maximised",Toast.LENGTH_SHORT).show();
Log.e("dragg", "maximised");
}
@Override
public void onMinimized() {
youtubePlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.CHROMELESS);
Toast.makeText(getActivity(), "Minimised", Toast.LENGTH_SHORT)
.show();
Log.e("dragg", "minimised");
}
@Override
public void onClosedToLeft() {
pauseVideo();
}
@Override
public void onClosedToRight() {
pauseVideo();
}
}
);
}
Note: video is paused, when closed to right or left not because of listeners, but because of " YouTube video playback stopped due to unauthorized overlay on top of player. The YouTubePlayerView is not contained inside its ancestor com.github.pedrovgs.DraggableView{41c02fd0 V.E..... .......D 0,0-720,1134 #7f0d00ac app:id/draggable_view}. The distances between the ancestor's edges and that of the YouTubePlayerView is: left: -720, top: 734, right: 720, bottom: 0 (these should all be positive)." When youtube fragment is out of screen
Just tried to changed style of youtube player id for maximised panel and minimised. However when I drag panel up and down i never see corresponding log messages.
Note: video is paused, when closed to right or left not because of listeners, but because of " YouTube video playback stopped due to unauthorized overlay on top of player. The YouTubePlayerView is not contained inside its ancestor com.github.pedrovgs.DraggableView{41c02fd0 V.E..... .......D 0,0-720,1134 #7f0d00ac app:id/draggable_view}. The distances between the ancestor's edges and that of the YouTubePlayerView is: left: -720, top: 734, right: 720, bottom: 0 (these should all be positive)." When youtube fragment is out of screen
edit: My xml