You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: