feat(tvos): add custom image metadata option for tvos and add missing types for custom metadata properties (#3280)
* fix: add typescript types for custom metadata properties * chore: add possibility to override image metadata of video playback --------- Co-authored-by: Olivier Bouillet <62574056+freeboub@users.noreply.github.com>
This commit is contained in:
@@ -408,6 +408,11 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
mapping[.commonIdentifierDescription] = description
|
||||
}
|
||||
|
||||
if let customImageUri = _source?.customImageUri,
|
||||
let imageData = RCTVideoUtils.createImageMetadataItem(imageUri: customImageUri) {
|
||||
mapping[.commonIdentifierArtwork] = imageData
|
||||
}
|
||||
|
||||
if #available(iOS 12.2, *), !mapping.isEmpty {
|
||||
playerItem.externalMetadata = RCTVideoUtils.createMetadataItems(for: mapping)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user