mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-03-06 16:30:55 +00:00
Fixes
This commit is contained in:
@@ -256,6 +256,7 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
||||
private var initiallyActivated = false
|
||||
private var hideStatusNodeUntilCentrality = false
|
||||
private var playOnContentOwnership = false
|
||||
private var skipInitialPause = false
|
||||
private var validLayout: (ContainerViewLayout, CGFloat)?
|
||||
private var didPause = false
|
||||
private var isPaused = true
|
||||
@@ -480,6 +481,7 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
||||
if strongSelf.playOnContentOwnership {
|
||||
strongSelf.playOnContentOwnership = false
|
||||
strongSelf.initiallyActivated = true
|
||||
strongSelf.skipInitialPause = true
|
||||
strongSelf.videoNode?.playOnceWithSound(playAndRecord: false, actionAtEnd: .stop)
|
||||
}
|
||||
}
|
||||
@@ -786,8 +788,12 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
||||
if hadPreviousValue {
|
||||
videoNode.canAttachContent = isVisible
|
||||
if isVisible {
|
||||
videoNode.pause()
|
||||
videoNode.seek(0.0)
|
||||
if self.skipInitialPause {
|
||||
self.skipInitialPause = false
|
||||
} else {
|
||||
videoNode.pause()
|
||||
videoNode.seek(0.0)
|
||||
}
|
||||
} else {
|
||||
videoNode.continuePlayingWithoutSound()
|
||||
}
|
||||
|
||||
@@ -530,8 +530,7 @@ private final class MediaPlayerContext {
|
||||
} else {
|
||||
if case let .timecode(time) = seek {
|
||||
self.seek(timestamp: Double(time), action: .play)
|
||||
}
|
||||
else if case .playing = self.state {
|
||||
} else if case .playing = self.state {
|
||||
} else {
|
||||
self.play()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user