@@ -49,17 +49,17 @@ extension Video {
49
49
50
50
private var titleMetaData : AVMetadataItem {
51
51
let _title = AVMutableMetadataItem ( )
52
- _title. key = AVMetadataCommonKeyTitle as ( NSCopying & NSObjectProtocol ) ?
53
- _title. keySpace = AVMetadataKeySpaceCommon
52
+ _title. key = AVMetadataKey . commonKeyTitle as ( NSCopying & NSObjectProtocol ) ?
53
+ _title. keySpace = . common
54
54
_title. locale = Locale . current
55
55
_title. value = title as ( NSCopying & NSObjectProtocol ) ?
56
56
return _title
57
57
}
58
58
59
59
private var descriptionMetaData : AVMetadataItem {
60
60
let _description = AVMutableMetadataItem ( )
61
- _description. key = AVMetadataCommonKeyDescription as ( NSCopying & NSObjectProtocol ) ?
62
- _description. keySpace = AVMetadataKeySpaceCommon
61
+ _description. key = AVMetadataKey . commonKeyDescription as ( NSCopying & NSObjectProtocol ) ?
62
+ _description. keySpace = . common
63
63
_description. locale = Locale . current
64
64
_description. value = ( description ?? " " )
65
65
. components ( separatedBy: CharacterSet . newlines)
@@ -106,10 +106,10 @@ private extension UIImage {
106
106
107
107
var metadataItem : AVMetadataItem {
108
108
let _item = AVMutableMetadataItem ( )
109
- _item. key = AVMetadataCommonKeyArtwork as ( NSCopying & NSObjectProtocol ) ?
110
- _item. keySpace = AVMetadataKeySpaceCommon
109
+ _item. key = AVMetadataKey . commonKeyArtwork as ( NSCopying & NSObjectProtocol ) ?
110
+ _item. keySpace = . common
111
111
_item. locale = Locale . current
112
- _item. value = UIImageJPEGRepresentation ( self , UIImage . JPEGLeastCompressionQuality) as ( NSCopying & NSObjectProtocol ) ?
112
+ _item. value = jpegData ( compressionQuality : UIImage . JPEGLeastCompressionQuality) as ( NSCopying & NSObjectProtocol ) ?
113
113
return _item
114
114
}
115
115
0 commit comments