You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**SourceName**| The URL or local filename of the video. | - |
127
128
|**Ext**| File extension for the video, used when loading from local resources. This is optional when a URL is provided and the URL ends with the video file extension. | "mp4" |
128
-
|**Subtitles**| The URL or local filename of the WebVTT (.vtt) subtitles file to be merged with the video. With a AVMutableComposition approach that is used currently in the package, you cannot directly change the position or size of subtitles. AVFoundation’s built-in handling of “text” tracks simply renders them in a default style, without allowing additional layout options. Take a look on the implementation in the example app (Video8.swift)| - |
129
+
|**Subtitles**| The URL or local filename of the WebVTT (.vtt) subtitles file to be merged with the video. With a AVMutableComposition approach that is used currently in the package, you cannot directly change the position or size of subtitles. AVFoundation’s built-in handling of “text” tracks simply renders them in a default style, without allowing additional layout options. Take a look on the implementation in the example app *Video8.swift*| - |
129
130
|**Gravity**| How the video content should be resized to fit the player's bounds. | .resizeAspect |
130
131
|**TimePublishing**| Specifies the interval at which the player publishes the current playback time. | - |
131
132
|**Loop**| Whether the video should automatically restart when it reaches the end. If not explicitly passed, the video will not loop. | false |
132
133
|**Mute**| Indicates if the video should play without sound. | false |
133
134
|**NotAutoPlay**| Indicates if the video should not play after initialization. Notice that if you use `command` as a control flow for the player the start command should be `.idle`| false |
134
135
|**EnableVector**| Use this struct to activate settings that allow the addition of vector-based overlays via commands. If it is not passed via settings, any commands to `addVector` or `removeAllVectors` will have no effect. | Not Enabled |
136
+
|**PictureInPicture()**| Enable Picture-in-Picture (PiP) support. If not passed than any command like `startPiP` or `stopPiP` have no effect. Take a look the example app *Video11.swift*|
135
137
136
138
### Additional Notes on Settings
137
139
@@ -172,6 +174,8 @@ In cases where you need to re-issue a command that might appear redundant but is
172
174
|`playbackSpeed(Float)`| Command to adjust the playback speed of the video. The `speed` parameter is a `Float` value representing the playback speed (e.g., 1.0 for normal speed, 0.5 for half speed, 2.0 for double speed). If a negative value is passed, it will be clamped to 0.0. |
173
175
|`loop`| Command to enable looping of the video playback. By default, looping is enabled, so this command will have no effect if looping is already active. |
174
176
|`unloop`| Command to disable looping of the video playback. This command will only take effect if the video is currently being looped. |
177
+
|`startPiP`| Command to initiate **Picture-in-Picture (PiP)** mode for video playback. If the PiP feature is already active, this command will have no additional effect. |
178
+
|`stopPiP`| Command to terminate **Picture-in-Picture (PiP)** mode, returning the video playback to its inline view. If PiP is not active, this command will have no effect. |
Copy file name to clipboardExpand all lines: Sources/swiftui-loop-videoplayer/enum/PlaybackCommand.swift
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -97,9 +97,12 @@ public enum PlaybackCommand: Equatable {
97
97
case audioTrack(languageCode:String)
98
98
99
99
#if os(iOS)
100
+
/// Command to initiate Picture-in-Picture (PiP) mode for video playback. If the PiP feature is already active, this command will have no additional effect.
100
101
case startPiP
101
102
103
+
/// Command to terminate Picture-in-Picture (PiP) mode, returning the video playback to its inline view. If PiP is not active, this command will have no effect.
0 commit comments