Thank you for your work. Your repository helps us a lot.
We used the CachingPlayerItem to play from Data. However, it is not able to get a thumbnail from the video using the normal approach. Please advise, thank you.
Assuming "playerItem" is a CachingPlayerItem initialized from Data
Normal Approach:
let player = AVPlayer(playerItem: playerItem)
let asset = player.currentItem?.asset ?? AVAsset()
let imageGenerator = AVAssetImageGenerator(asset: asset)
then I should be able to get a CGImage from imageGenerator.copyCGImage(at: .zero, actualTime:nil)
Dear Team,
Thank you for your work. Your repository helps us a lot. We used the CachingPlayerItem to play from Data. However, it is not able to get a thumbnail from the video using the normal approach. Please advise, thank you.
Assuming "playerItem" is a CachingPlayerItem initialized from Data Normal Approach: let player = AVPlayer(playerItem: playerItem) let asset = player.currentItem?.asset ?? AVAsset() let imageGenerator = AVAssetImageGenerator(asset: asset) then I should be able to get a CGImage from imageGenerator.copyCGImage(at: .zero, actualTime:nil)
Waiting for your reply