Skip to content

Commit e84d4fb

Browse files
committed
Update Events.swift
1 parent 97c50b9 commit e84d4fb

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

Sources/swiftui-loop-videoplayer/settings/Events.swift

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,25 @@
77

88
import Foundation
99

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.
1013
@available(iOS 14.0, macOS 11.0, tvOS 14.0, *)
11-
public struct Events: SettingsConvertible{
14+
public struct Events: SettingsConvertible {
1215

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]?
1518

16-
// MARK: - Life circle
19+
// MARK: - Life cycle
1720

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) {
2024
self.value = value
2125
}
2226

23-
/// Fetch settings
27+
/// Converts the event filters into an array of `Setting` objects
28+
/// Used for fetching settings in the application
2429
@_spi(Private)
2530
public func asSettings() -> [Setting] {
2631
[.events(value)]

0 commit comments

Comments
 (0)