mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various Improvements
This commit is contained in:
@@ -317,7 +317,7 @@ class ChatMessageInteractiveInstantVideoNode: ASDisplayNode {
|
||||
strongSelf.videoFrame = displayVideoFrame
|
||||
strongSelf.secretProgressIcon = secretProgressIcon
|
||||
strongSelf.automaticDownload = automaticDownload
|
||||
|
||||
|
||||
if let updatedInfoBackgroundImage = updatedInfoBackgroundImage {
|
||||
strongSelf.infoBackgroundNode.image = updatedInfoBackgroundImage
|
||||
}
|
||||
@@ -832,6 +832,20 @@ class ChatMessageInteractiveInstantVideoNode: ASDisplayNode {
|
||||
}
|
||||
}
|
||||
|
||||
func seekTo(_ position: Double) {
|
||||
if let duration = self.playbackStatusNode?.duration {
|
||||
self.videoNode?.seek(position * duration)
|
||||
}
|
||||
}
|
||||
|
||||
func play() {
|
||||
self.videoNode?.play()
|
||||
}
|
||||
|
||||
func pause() {
|
||||
self.videoNode?.pause()
|
||||
}
|
||||
|
||||
func playMediaWithSound() -> (action: (Double?) -> Void, soundEnabled: Bool, isVideoMessage: Bool, isUnread: Bool, badgeNode: ASDisplayNode?)? {
|
||||
if let item = self.item {
|
||||
var isUnconsumed = false
|
||||
|
||||
Reference in New Issue
Block a user