Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 688a6a0

Browse files
Update Setting.swift
1 parent e84d4fb commit 688a6a0

File tree

1 file changed

+29
-30
lines changed

1 file changed

+29
-30
lines changed

‎Sources/swiftui-loop-videoplayer/enum/Setting.swift‎

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,61 +11,60 @@ import SwiftUI
1111
import AVKit
1212
#endif
1313

14-
/// Settings for loop video player
14+
/// Configuration settings for a loop video player.
15+
/// These settings control various playback and UI behaviors.
1516
@available(iOS 14.0, macOS 11.0, tvOS 14.0, *)
16-
public enum Setting: Equatable, SettingsConvertible{
17-
18-
/// Converts the current setting to an array containing only this setting.
19-
/// - Returns: An array of `Setting` containing the single instance of this setting.
17+
public enum Setting: Equatable, SettingsConvertible{
18+
19+
/// Converts the current setting into an array containing itself.
20+
/// - Returns: An array with a single instance of `Setting`.
2021
public func asSettings() -> [Setting] {
2122
[self]
2223
}
23-
24+
25+
/// Event filters to monitor specific player events.
2426
case events([PlayerEventFilter]?)
25-
26-
///Enable vector layer to add overlay vector graphics
27+
28+
/// Enables a vector layer for overlaying vector graphics.
2729
case vector
28-
29-
/// Loop video
30+
31+
/// Enables looping of the video playback.
3032
case loop
31-
32-
/// Mute video
33+
34+
/// Mutes the video.
3335
case mute
34-
35-
/// Don't auto play video after initialization
36+
37+
/// Prevents automatic playback after initialization.
3638
case notAutoPlay
37-
38-
/// File name
39+
40+
/// Specifies the file name of the video.
3941
case name(String)
4042

41-
/// File extension
43+
/// Specifies the file extension of the video.
4244
case ext(String)
43-
44-
/// Subtitles
45+
46+
/// Sets subtitles for the video.
4547
case subtitles(String)
46-
47-
/// Support Picture-in-Picture
48+
49+
/// Enables Picture-in-Picture (PiP) mode support.
4850
case pictureInPicture
49-
50-
/// A CMTime value representing the interval at which the player's current time should be published.
51-
/// If set, the player will publish periodic time updates based on this interval.
51+
52+
/// Defines the interval at which the player's current time should be published.
5253
case timePublishing(CMTime)
5354

54-
/// Video gravity
55+
/// Sets the video gravity (e.g., aspect fit, aspect fill).
5556
case gravity(AVLayerVideoGravity = .resizeAspect)
5657

57-
/// Case name
58+
/// Retrieves the name of the current case.
5859
var caseName: String {
5960
Mirror(reflecting: self).children.first?.label ?? "\(self)"
6061
}
61-
62-
/// Associated value
62+
63+
/// Retrieves the associated value of the case, if any.
6364
var associatedValue: Any? {
64-
6565
guard let firstChild = Mirror(reflecting: self).children.first else {
6666
return nil
6767
}
68-
6968
return firstChild.value
7069
}
7170
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /