@@ -58,14 +58,20 @@ public struct VideoSettings: Equatable{
5858 // MARK: - Life circle
5959
6060 /// Initializes a new instance of `VideoSettings` with specified values for various video properties.
61+ ///
6162 /// - Parameters:
62- /// - name: The name of the video.
63- /// - ext: The video file extension.
64- /// - loop: A Boolean indicating whether the video should loop.
65- /// - mute: A Boolean indicating whether the video should be muted.
66- /// - notAutoPlay: A Boolean indicating whether the video should not auto-play.
67- /// - timePublishing: A `CMTime` value representing the interval for time publishing updates, or `nil`.
68- /// - gravity: The `AVLayerVideoGravity` value defining how the video should be displayed in its layer.
63+ /// - name: The name of the video file (excluding the extension).
64+ /// - ext: The file extension of the video (e.g., `"mp4"`, `"mov"`).
65+ /// - subtitles: The subtitle file name or identifier to be used for the video.
66+ /// - loop: A Boolean indicating whether the video should continuously loop after playback ends.
67+ /// - pictureInPicture: A Boolean indicating whether Picture-in-Picture (PiP) mode is enabled.
68+ /// - mute: A Boolean indicating whether the video should start muted.
69+ /// - notAutoPlay: A Boolean indicating whether the video should not start playing automatically.
70+ /// - timePublishing: A `CMTime` value representing the interval for time update callbacks, or `nil` if disabled.
71+ /// - gravity: The `AVLayerVideoGravity` value defining how the video should be displayed within its layer.
72+ /// - enableVector: A Boolean indicating whether vector graphics rendering should be enabled for overlays.
73+ ///
74+ /// All parameters must be provided, except `timePublishing`, which can be `nil`, and `enableVector`, which defaults to `false`.
6975 public init ( name: String , ext: String , subtitles: String , loop: Bool , pictureInPicture: Bool , mute: Bool , notAutoPlay: Bool , timePublishing: CMTime ? , gravity: AVLayerVideoGravity , enableVector : Bool = false ) {
7076 self . name = name
7177 self . ext = ext
@@ -112,11 +118,6 @@ public struct VideoSettings: Equatable{
112118@available ( iOS 14 . 0 , macOS 11 . 0 , tvOS 14 . 0 , * )
113119public extension VideoSettings {
114120
115- /// Returns a new instance of VideoSettings with loop set to false and notAutoPlay set to true, keeping other settings unchanged.
116- var settingsWithAutoPlay : VideoSettings {
117- VideoSettings ( name: self . name, ext: self . ext, subtitles: self . subtitles, loop: self . loop, pictureInPicture: self . pictureInPicture, mute: self . mute, notAutoPlay: false , timePublishing: self . timePublishing, gravity: self . gravity, enableVector: self . vector)
118- }
119-
120121 func getAssets( ) -> AVURLAsset ? {
121122 assetFor ( self )
122123 }
0 commit comments