File tree 1 file changed +8
-3
lines changed
Sources/swiftui-loop-videoplayer/view/loop/main 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,11 @@ struct LoopPlayerMultiPlatform: LoopPlayerViewProtocol {
51
51
52
52
/// Initializes a new instance with the provided settings and playback command.
53
53
///
54
+ /// This initializer sets up the necessary configuration and command bindings for playback functionality.
55
+ ///
54
56
/// - Parameters:
55
- /// - settings: An instance of `Settings ` containing configuration details.
57
+ /// - settings: A binding to an instance of `VideoSettings ` containing configuration details.
56
58
/// - 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.
59
59
init ( settings: Binding < VideoSettings > , command: Binding < PlaybackCommand > ) {
60
60
self . _settings = settings
61
61
self . _command = command
@@ -149,6 +149,11 @@ extension LoopPlayerMultiPlatform: NSViewRepresentable{
149
149
}
150
150
#endif
151
151
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.
152
157
fileprivate func getAssetIfChanged( settings: VideoSettings , asset: AVURLAsset ? ) -> AVURLAsset ? {
153
158
let a = assetForName ( name: settings. name, ext: settings. ext)
154
159
You can’t perform that action at this time.
0 commit comments