Various Improvements

This commit is contained in:
Ilya Laktyushin
2021-07-21 14:10:17 +03:00
68 changed files with 6177 additions and 6085 deletions

View File

@@ -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