File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Sources/swiftui-loop-videoplayer/settings Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 7
7
8
8
import Foundation
9
9
10
+ /// Represents a collection of event filters that can be converted into settings.
11
+ /// This struct is used to encapsulate `PlayerEventFilter` instances and provide a method
12
+ /// to transform them into an array of `Setting` objects.
10
13
@available ( iOS 14 . 0 , macOS 11 . 0 , tvOS 14 . 0 , * )
11
- public struct Events : SettingsConvertible {
14
+ public struct Events : SettingsConvertible {
12
15
13
- /// Holds the specific AVLayerVideoGravity setting defining how video content should align within its layer.
14
- private let value : [ PlayerEventFilter ] ?
16
+ // An optional array of PlayerEventFilter objects representing event filters
17
+ private let value : [ PlayerEventFilter ] ?
15
18
16
- // MARK: - Life circle
19
+ // MARK: - Life cycle
17
20
18
- /// Initializes a new instance
19
- public init ( _ value : [ PlayerEventFilter ] ? = nil ) {
21
+ /// Initializes a new instance of `Events`
22
+ /// - Parameter value: An optional array of `PlayerEventFilter` objects, defaulting to `nil`
23
+ public init ( _ value: [ PlayerEventFilter ] ? = nil ) {
20
24
self . value = value
21
25
}
22
26
23
- /// Fetch settings
27
+ /// Converts the event filters into an array of `Setting` objects
28
+ /// Used for fetching settings in the application
24
29
@_spi ( Private)
25
30
public func asSettings( ) -> [ Setting ] {
26
31
[ . events( value) ]
You can’t perform that action at this time.
0 commit comments