Play videos on autoplay when they are selected.

captchafix
Florens Douwes 11 years ago
parent e903521c94
commit da648d9677
  1. 14
      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,8 +139,14 @@ 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) {
imageView.getVideoView().start(); if (!videoVisible) {
startVideo();
} else {
if (imageView.getVideoView() != null) {
imageView.getVideoView().start();
}
}
} }
} }

Loading…
Cancel
Save