mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Various Fixes
This commit is contained in:
parent
ffed0c5515
commit
f6ba6d264c
@ -367,15 +367,7 @@ public final class MediaPlayerNode: ASDisplayNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public var captureProtected: Bool = false {
|
public init(backgroundThread: Bool = false, captureProtected: Bool = false) {
|
||||||
didSet {
|
|
||||||
if #available(iOS 13.0, *) {
|
|
||||||
self.videoLayer?.preventsCapture = captureProtected
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public init(backgroundThread: Bool = false) {
|
|
||||||
self.videoNode = MediaPlayerNodeDisplayNode()
|
self.videoNode = MediaPlayerNodeDisplayNode()
|
||||||
|
|
||||||
if false && backgroundThread {
|
if false && backgroundThread {
|
||||||
@ -406,7 +398,7 @@ public final class MediaPlayerNode: ASDisplayNode {
|
|||||||
if let strongSelf = self {
|
if let strongSelf = self {
|
||||||
strongSelf.videoLayer = videoLayer
|
strongSelf.videoLayer = videoLayer
|
||||||
if #available(iOS 13.0, *) {
|
if #available(iOS 13.0, *) {
|
||||||
videoLayer.preventsCapture = strongSelf.captureProtected
|
videoLayer.preventsCapture = captureProtected
|
||||||
}
|
}
|
||||||
strongSelf.updateLayout()
|
strongSelf.updateLayout()
|
||||||
|
|
||||||
|
@ -1573,6 +1573,9 @@ final class ChatMessageInteractiveMediaNode: ASDisplayNode, GalleryItemTransitio
|
|||||||
imageView.contentMode = .scaleToFill
|
imageView.contentMode = .scaleToFill
|
||||||
imageView.image = strongSelf.imageNode.image
|
imageView.image = strongSelf.imageNode.image
|
||||||
imageView.frame = strongSelf.imageNode.frame
|
imageView.frame = strongSelf.imageNode.frame
|
||||||
|
if imageView.layer.contents == nil {
|
||||||
|
imageView.layer.contents = imageView.image?.cgImage
|
||||||
|
}
|
||||||
strongSelf.imageNode.view.superview?.insertSubview(imageView, aboveSubview: strongSelf.imageNode.view)
|
strongSelf.imageNode.view.superview?.insertSubview(imageView, aboveSubview: strongSelf.imageNode.view)
|
||||||
|
|
||||||
view = self?.view.snapshotContentTree(unhide: true)
|
view = self?.view.snapshotContentTree(unhide: true)
|
||||||
|
@ -172,8 +172,7 @@ private final class NativeVideoContentNode: ASDisplayNode, UniversalVideoContent
|
|||||||
actionAtEndImpl?()
|
actionAtEndImpl?()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
self.playerNode = MediaPlayerNode(backgroundThread: false)
|
self.playerNode = MediaPlayerNode(backgroundThread: false, captureProtected: captureProtected)
|
||||||
self.playerNode.captureProtected = captureProtected
|
|
||||||
self.player.attachPlayerNode(self.playerNode)
|
self.player.attachPlayerNode(self.playerNode)
|
||||||
|
|
||||||
self.dimensions = fileReference.media.dimensions?.cgSize
|
self.dimensions = fileReference.media.dimensions?.cgSize
|
||||||
|
Loading…
x
Reference in New Issue
Block a user