@@ -16,6 +16,8 @@ import CoreImage
16
16
@MainActor
17
17
public protocol AbstractPlayer : AnyObject {
18
18
19
+ // MARK: - Properties
20
+
19
21
/// An optional property that stores the current video settings.
20
22
///
21
23
/// This property holds an instance of `VideoSettings` or nil if no settings have been configured yet.
@@ -25,15 +27,6 @@ public protocol AbstractPlayer: AnyObject {
25
27
/// The delegate to be notified about errors encountered by the player.
26
28
var delegate : PlayerDelegateProtocol ? { get set }
27
29
28
- /// Retrieves the current item being played.
29
- var currentItem : AVPlayerItem ? { get }
30
-
31
- /// The current asset being played, if available.
32
- var currentAsset : AVURLAsset ? { get }
33
-
34
- /// Check if looping is applied
35
- var isLooping : Bool { get }
36
-
37
30
/// Adjusts the brightness of the video. Default is 0 (no change), with positive values increasing and negative values decreasing brightness.
38
31
var brightness : Float { get set }
39
32
@@ -49,7 +42,18 @@ public protocol AbstractPlayer: AnyObject {
49
42
/// The queue player that plays the video items.
50
43
var player : AVQueuePlayer ? { get set }
51
44
52
- // Playback control methods
45
+ // MARK: - Calculated properties
46
+
47
+ /// Retrieves the current item being played.
48
+ var currentItem : AVPlayerItem ? { get }
49
+
50
+ /// The current asset being played, if available.
51
+ var currentAsset : AVURLAsset ? { get }
52
+
53
+ /// Check if looping is applied
54
+ var isLooping : Bool { get }
55
+
56
+ // MARK: - Playback control methods
53
57
54
58
/// Initiates or resumes playback of the video.
55
59
/// This method should be implemented to start playing the video from its current position.
0 commit comments