Play videos on autoplay when they are selected.

captchafix
Florens Douwes 11 years ago
parent e903521c94
commit da648d9677
  1. 12
      Clover/app/src/main/java/org/floens/chan/ui/fragment/ImageViewFragment.java

@ -104,10 +104,6 @@ public class ImageViewFragment extends Fragment implements ThumbnailImageViewCal
isVideo = true; isVideo = true;
activity.invalidateActionBar(); activity.invalidateActionBar();
showProgressBar(false); showProgressBar(false);
if (ChanPreferences.getVideoAutoPlay()) {
startVideo();
}
} else { } else {
imageView.setBigImage(post.imageUrl); imageView.setBigImage(post.imageUrl);
} }
@ -143,10 +139,16 @@ public class ImageViewFragment extends Fragment implements ThumbnailImageViewCal
activity.invalidateActionBar(); activity.invalidateActionBar();
if (ChanPreferences.getVideoAutoPlay() && imageView != null && imageView.getVideoView() != null) { if (isVideo && ChanPreferences.getVideoAutoPlay() && imageView != null) {
if (!videoVisible) {
startVideo();
} else {
if (imageView.getVideoView() != null) {
imageView.getVideoView().start(); imageView.getVideoView().start();
} }
} }
}
}
public void onDeselected() { public void onDeselected() {
if (imageView != null && imageView.getVideoView() != null) { if (imageView != null && imageView.getVideoView() != null) {

Loading…
Cancel
Save