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:
@@ -330,4 +330,15 @@ enum RCTVideoUtils {
|
||||
item.extendedLanguageTag = "und"
|
||||
return item.copy() as! AVMetadataItem
|
||||
}
|
||||
|
||||
static func createImageMetadataItem(imageUri: String) -> Data? {
|
||||
if let uri = URL(string: imageUri),
|
||||
let imgData = try? Data(contentsOf: uri),
|
||||
let image = UIImage(data: imgData),
|
||||
let pngData = image.pngData() {
|
||||
return pngData
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user