Skip to content

Commit

Permalink
Fix GIF Play/pause. (#6)
Browse files Browse the repository at this point in the history
* Minor issue fixes
  • Loading branch information
BhavnikDesai authored Jul 28, 2022
1 parent 2be119b commit 208af31
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MiStoryView is a simple configurable library to integrate stories features into

# Key features
* Set a list of image/video/GIF URLs in MiStoryView.
* Set fixed duration for particular story for media type Image/GIF only (in milliseconds).
* Set fixed duration for particular story of media type Image/GIF only (in milliseconds).
* Duration for media type Video will be set automatically.
* Set any of the predefined animations, while swiping between multiple stories.
* Move to the back and forth story by tapping on the right and left parts of an image.
Expand Down
2 changes: 1 addition & 1 deletion mistoryview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ android {
minSdk 21
targetSdk 31
versionCode 1
versionName "0.0.2"
versionName "0.0.3"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@ class MiStoryDisplayFragment(
fun pauseExoPlayer(draggingState: Int) {
if (draggingState == SCROLL_STATE_DRAGGING) {
exoPlayer?.playWhenReady = false
// Pause GIF if user starts swiping.
if (animatedDrawable != null)
animatedDrawable?.stop()
}
}

Expand Down

0 comments on commit 208af31

Please sign in to comment.