Skip to content

Commit 55d1ae5

Browse files
committed
Update LoopPlayerMultiPlatform.swift
1 parent 080ee32 commit 55d1ae5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Sources/swiftui-loop-videoplayer/view/loop/main/LoopPlayerMultiPlatform.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ struct LoopPlayerMultiPlatform: LoopPlayerViewProtocol {
5151

5252
/// Initializes a new instance with the provided settings and playback command.
5353
///
54+
/// This initializer sets up the necessary configuration and command bindings for playback functionality.
55+
///
5456
/// - Parameters:
55-
/// - settings: An instance of `Settings` containing configuration details.
57+
/// - settings: A binding to an instance of `VideoSettings` containing configuration details.
5658
/// - command: A binding to a `PlaybackCommand` that controls playback actions.
57-
///
58-
/// This initializer sets up the necessary configuration and command bindings for playback functionality.
5959
init(settings: Binding<VideoSettings>, command: Binding<PlaybackCommand>) {
6060
self._settings = settings
6161
self._command = command
@@ -149,6 +149,11 @@ extension LoopPlayerMultiPlatform: NSViewRepresentable{
149149
}
150150
#endif
151151

152+
/// Checks if the asset has changed based on the provided settings and current asset.
153+
/// - Parameters:
154+
/// - settings: The current video settings, containing the asset's name and extension.
155+
/// - asset: The current asset being played.
156+
/// - Returns: A new `AVURLAsset` if the asset has changed, or `nil` if the asset remains the same.
152157
fileprivate func getAssetIfChanged(settings: VideoSettings, asset: AVURLAsset?) -> AVURLAsset?{
153158
let a = assetForName(name: settings.name, ext: settings.ext)
154159

0 commit comments

Comments
 (0)