Don’t play GIFs in timelines if “Reduce Motion” is enabled
This commit is contained in:
parent
3b3f870caa
commit
6bf5f94169
|
@ -191,7 +191,19 @@ extension MediaView {
|
|||
playerViewController.showsPlaybackControls = false
|
||||
|
||||
// auto play for GIF
|
||||
if !UIAccessibility.isReduceMotionEnabled {
|
||||
player.play()
|
||||
}
|
||||
NotificationCenter.default
|
||||
.publisher(for: UIAccessibility.reduceMotionStatusDidChangeNotification)
|
||||
.sink { _ in
|
||||
if UIAccessibility.isReduceMotionEnabled {
|
||||
player.pause()
|
||||
} else {
|
||||
player.play()
|
||||
}
|
||||
}
|
||||
.store(in: &_disposeBag)
|
||||
|
||||
bindAlt(configuration: configuration, altDescription: info.altDescription)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue