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
Copy file name to clipboardExpand all lines: README.md
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -25,17 +25,21 @@ Please note that using videos from URLs requires ensuring that you have the righ
25
25
|`init(fileName:ext:gravity:` <br> `eColor:eFontSize:command:)`| Constructor | Initializes the player with specific video parameters and playback command binding. |
26
26
|`init(settings: () -> VideoSettings, command:)`| Constructor | Initializes the player with a declarative settings block and playback command binding. |
|`seek(to: Double)`| Command to seek to a specific time in the video. The parameter is the target position in seconds. Note: Errors such as seeking out of bounds are not currently handled and will be silently ignored. Potential errors include: <br> - `.seekTimeOutOfBounds`<br> - `.invalidDuration` <br> - `.playerOrCurrentItemNil `. <br> Future versions may introduce error handling for these cases. |
35
-
|`begin`| Command to position the video at the beginning. ||
36
-
|`end`| Command to position the video at the end. |
37
-
|`mute`| Command to mute the video. By default, the player is muted. ||
38
-
|`unmute`| Command to unmute the video. |
35
+
|`seek(to: Double)`| Command to seek to a specific time in the video. The parameter is the target position in seconds. If the time is negative, the playback will move to the start of the video. If the time exceeds the video's duration, the playback will move to the end of the video. If the time is within the video’s duration, the playback will move to the specified time. |
36
+
|`begin`| Command to position the video at the beginning. |
37
+
|`end`| Command to position the video at the end. |
38
+
|`mute`| Command to mute the video. By default, the player is muted. |
39
+
|`unmute`| Command to unmute the video. |
40
+
|`volume(Float)`| Command to adjust the volume of the video playback. The `volume` parameter is a `Float` value between 0.0 (mute) and 1.0 (full volume). If a value outside this range is passed, it will be clamped to the nearest valid value (0.0 or 1.0). |
41
+
|`subtitles(String?)`| Command to set subtitles to a specified language or turn them off. Pass a language code (e.g., "en" for English) to set subtitles, or `nil` to turn them off. |
42
+
|`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. |
0 commit comments