mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Native picture in picture support
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Display
|
||||
import AVFoundation
|
||||
import AsyncDisplayKit
|
||||
|
||||
public final class OverlayMediaControllerEmbeddingItem {
|
||||
public let position: CGPoint
|
||||
@@ -15,6 +17,10 @@ public final class OverlayMediaControllerEmbeddingItem {
|
||||
}
|
||||
}
|
||||
|
||||
public protocol PictureInPictureContent: AnyObject {
|
||||
var videoNode: ASDisplayNode { get }
|
||||
}
|
||||
|
||||
public protocol OverlayMediaController: AnyObject {
|
||||
var updatePossibleEmbeddingItem: ((OverlayMediaControllerEmbeddingItem?) -> Void)? { get set }
|
||||
var embedPossibleEmbeddingItem: ((OverlayMediaControllerEmbeddingItem) -> Bool)? { get set }
|
||||
@@ -22,6 +28,10 @@ public protocol OverlayMediaController: AnyObject {
|
||||
var hasNodes: Bool { get }
|
||||
func addNode(_ node: OverlayMediaItemNode, customTransition: Bool)
|
||||
func removeNode(_ node: OverlayMediaItemNode, customTransition: Bool)
|
||||
|
||||
func setPictureInPictureContent(content: PictureInPictureContent, absoluteRect: CGRect)
|
||||
func setPictureInPictureContentHidden(content: PictureInPictureContent, isHidden value: Bool)
|
||||
func removePictureInPictureContent(content: PictureInPictureContent)
|
||||
}
|
||||
|
||||
public final class OverlayMediaManager {
|
||||
|
||||
Reference in New Issue
Block a user