This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import AVKit | |
| import Foundation | |
| class VideoHelper { | |
| static func getThumbnail(from player: AVPlayer, at time: CMTime, maximumSize: CGSize? = nil) -> CGImage? { | |
| guard let currentItem = player.currentItem else { return nil } | |
| return getThumbnail(from: currentItem.asset, at: time, maximumSize: maximumSize) | |
| } | |