Skip to content

Commit 1a395f8

Browse files
committed
update
1 parent ff27a93 commit 1a395f8

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

Sources/swiftui-loop-videoplayer/protocol/player/AbstractPlayer.swift

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import CoreImage
1616
@MainActor
1717
public protocol AbstractPlayer: AnyObject {
1818

19+
// MARK: - Properties
20+
1921
/// An optional property that stores the current video settings.
2022
///
2123
/// This property holds an instance of `VideoSettings` or nil if no settings have been configured yet.
@@ -25,15 +27,6 @@ public protocol AbstractPlayer: AnyObject {
2527
/// The delegate to be notified about errors encountered by the player.
2628
var delegate: PlayerDelegateProtocol? { get set }
2729

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-
3730
/// Adjusts the brightness of the video. Default is 0 (no change), with positive values increasing and negative values decreasing brightness.
3831
var brightness: Float { get set }
3932

@@ -49,7 +42,18 @@ public protocol AbstractPlayer: AnyObject {
4942
/// The queue player that plays the video items.
5043
var player: AVQueuePlayer? { get set }
5144

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
5357

5458
/// Initiates or resumes playback of the video.
5559
/// This method should be implemented to start playing the video from its current position.

Sources/swiftui-loop-videoplayer/protocol/player/ExtPlayerProtocol.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ internal extension ExtPlayerProtocol {
168168
/// player item is ready for playback.
169169
///
170170
/// - Parameters:
171-
/// - settings: A `VideoSettings` struct containing configurations such as playback gravity, looping behavior,
172-
/// and whether the audio should be muted.
171+
/// - settings: A `VideoSettings` struct containing configurations such as playback gravity, looping behavior, whether the audio should be muted.
173172
func update(settings: VideoSettings) {
174173

175174
if settings.isEqual(currentSettings){

0 commit comments

Comments
 (0)