2 changed files with 236 additions and 0 deletions
@ -0,0 +1,146 @@ |
|||||
|
// |
||||
|
// Created by Marco Schmickler |
||||
|
// Copyright (c) 2024 Marco Schmickler. All rights reserved. |
||||
|
// |
||||
|
|
||||
|
import SwiftUI |
||||
|
|
||||
|
struct SVideoHelpView: View { |
||||
|
var completionHandler: () -> Void |
||||
|
|
||||
|
var body: some View { |
||||
|
NavigationView { |
||||
|
ScrollView { |
||||
|
if let text = helpAttributedString() { |
||||
|
Text(text) |
||||
|
.padding() |
||||
|
.frame(maxWidth: .infinity, alignment: .leading) |
||||
|
} else { |
||||
|
Text(helpMarkdown) |
||||
|
.padding() |
||||
|
.frame(maxWidth: .infinity, alignment: .leading) |
||||
|
} |
||||
|
} |
||||
|
.navigationTitle("Video Help") |
||||
|
.navigationBarTitleDisplayMode(.inline) |
||||
|
.toolbar { |
||||
|
ToolbarItem(placement: .navigationBarTrailing) { |
||||
|
Button("Done", action: completionHandler) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private func helpAttributedString() -> AttributedString? { |
||||
|
try? AttributedString(markdown: helpMarkdown, |
||||
|
options: .init(interpretedSyntax: .inlineOnlyPreservingWhitespace)) |
||||
|
} |
||||
|
|
||||
|
private let helpMarkdown = """ |
||||
|
# KPlayer Video Help |
||||
|
|
||||
|
## Gestures |
||||
|
|
||||
|
**Double tap** — Toggle fullscreen: hides all controls and overlays |
||||
|
|
||||
|
**Triple tap** — Take snapshot; exits fullscreen if active |
||||
|
|
||||
|
**Long press** — Pause / resume |
||||
|
|
||||
|
**Pinch** — Zoom in or out (always active) |
||||
|
|
||||
|
### Drag while playing |
||||
|
|
||||
|
**Swipe right/left** — Seek ±30 s; ±10 s in fullscreen; ±5 s / ±8 s in slow or zoom mode |
||||
|
|
||||
|
**Swipe down/up** — Next / previous item (requires *jump* mode; disabled in fullscreen) |
||||
|
|
||||
|
**Drag lower area** — Pan (in zoom, small, or fullscreen mode) |
||||
|
|
||||
|
### Drag while paused |
||||
|
|
||||
|
**Upper zone** — Fine scrub (high precision) |
||||
|
|
||||
|
**Lower zone** — Coarse scrub; or pan when zoomed / small / fullscreen |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Toolbar Buttons |
||||
|
|
||||
|
**next / cancel** — Close player; saves in edit mode |
||||
|
|
||||
|
**[time]** — Position relative to clip start. Tap to open/close the More panel |
||||
|
|
||||
|
**[tag]** — Apply the current tag (yellow = applied) |
||||
|
|
||||
|
**♥** — Toggle favourite |
||||
|
|
||||
|
**loop5** — Loop a 5-second window from the current position |
||||
|
|
||||
|
**cfg** — Open settings |
||||
|
|
||||
|
**save** — Export clip to folder 1, 2, or 3 |
||||
|
|
||||
|
**embd** — Show/hide embedded side-by-side video overlay |
||||
|
|
||||
|
**?** — This help screen |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## More Panel |
||||
|
|
||||
|
Tap the time button to open or close. |
||||
|
|
||||
|
**tilt** — Gyroscope-controlled horizontal pan |
||||
|
|
||||
|
**slow** — Half speed; also shrinks seek jumps to ±5 s / ±8 s |
||||
|
|
||||
|
**zoom** — Auto-pan and zoom using saved keyframes |
||||
|
|
||||
|
**jump** — Vertical swipe skips to next / previous item (disabled in fullscreen) |
||||
|
|
||||
|
**small** — Crop-preview overlay; unlocks pan in lower drag zone |
||||
|
|
||||
|
**loop** — Loop within clip start/end markers |
||||
|
|
||||
|
**flip** — Rotate video 180° |
||||
|
|
||||
|
**lores** — Secondary zoom/offset for low-resolution sources |
||||
|
|
||||
|
**[speed]** — Cycle speed: 0.25× → 0.5× → 1× → 2× |
||||
|
|
||||
|
**pause** — Pause / resume |
||||
|
|
||||
|
**black** — Mark item deleted and close (requires confirmation) |
||||
|
|
||||
|
**trunc** — Truncate at current position (requires confirmation) |
||||
|
|
||||
|
**cut** — Cut / trim operation |
||||
|
|
||||
|
**start** — Tap: seek to clip start. Long press: set clip start here |
||||
|
|
||||
|
**end** — Tap: seek to clip end. Long press: set clip end here |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Fullscreen Mode |
||||
|
|
||||
|
Double tap enters fullscreen: toolbar and controls are hidden. Zoom and pan remain active. Double tap again or triple tap (which also takes a snapshot) to exit. |
||||
|
|
||||
|
Jump mode is disabled in fullscreen — vertical swipes do not skip items. |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Edit Mode |
||||
|
|
||||
|
Enable via cfg → Edit. |
||||
|
|
||||
|
**frame** — Save current zoom/pan as a keyframe |
||||
|
|
||||
|
**snap** — Screenshot to clipboard |
||||
|
|
||||
|
**start** (long press) — Set clip start to current position |
||||
|
|
||||
|
**end** (long press) — Set clip end to current position |
||||
|
""" |
||||
|
} |
||||
@ -0,0 +1,90 @@ |
|||||
|
# KPlayer Video Help |
||||
|
|
||||
|
## Gestures |
||||
|
|
||||
|
| Gesture | Action | |
||||
|
|---|---| |
||||
|
| **Double tap** | Toggle fullscreen — hides all controls and overlays | |
||||
|
| **Triple tap** | Take snapshot; exits fullscreen if active | |
||||
|
| **Long press** | Pause / resume | |
||||
|
| **Pinch** | Zoom in or out (always active) | |
||||
|
|
||||
|
### Drag — while **playing** |
||||
|
|
||||
|
| Gesture | Action | |
||||
|
|---|---| |
||||
|
| Swipe right | Seek forward 30 s; 10 s in fullscreen; 5 s in slow/zoom mode | |
||||
|
| Swipe left | Seek back 30 s; 10 s in fullscreen; 8 s in slow/zoom mode | |
||||
|
| Swipe down | Next item in list (requires **jump** mode; disabled in fullscreen) | |
||||
|
| Swipe up | Previous item in list (requires **jump** mode; disabled in fullscreen) | |
||||
|
| Drag from lower area | Pan (requires zoom, small, or fullscreen mode) | |
||||
|
|
||||
|
### Drag — while **paused** |
||||
|
|
||||
|
| Start position | Action | |
||||
|
|---|---| |
||||
|
| Upper zone | Fine scrub (high precision, ÷100) | |
||||
|
| Lower zone | Coarse scrub (faster, ÷30) | |
||||
|
| Lower zone in zoom/small/fullscreen | Pan | |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Toolbar Buttons |
||||
|
|
||||
|
| Button | Action | |
||||
|
|---|---| |
||||
|
| **next** / **cancel** | Close player. In edit mode saves changes; long name shows confirm dialog | |
||||
|
| **[time]** | Time relative to clip start. Tap to toggle the **More** panel | |
||||
|
| **[tag]** | Apply the current tag to this item (turns yellow when applied) | |
||||
|
| **♥** | Toggle favourite | |
||||
|
| **loop5** | Loop a 5-second window from the current position | |
||||
|
| **cfg** | Open settings | |
||||
|
| **save** | Export clip to folder 1, 2, or 3 | |
||||
|
| **embd** | Show/hide embedded side-by-side video overlay | |
||||
|
| **?** | This help screen | |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## More Panel |
||||
|
|
||||
|
Tap the time button to open. Tap again to close. |
||||
|
|
||||
|
| Button | Action | |
||||
|
|---|---| |
||||
|
| **tilt** | Gyroscope-controlled horizontal pan | |
||||
|
| **slow** | Halve playback speed; also reduces seek jumps to ±5 s / 8 s | |
||||
|
| **zoom** | Auto-pan and zoom based on saved keyframes | |
||||
|
| **jump** | Enable vertical swipe to skip to next/previous item | |
||||
|
| **small** | Crop-preview overlay; enables pan in the lower drag zone | |
||||
|
| **loop** | Loop within the clip's start/end markers | |
||||
|
| **flip** | Rotate video 180° | |
||||
|
| **lores** | Apply secondary zoom/offset for low-resolution sources | |
||||
|
| **[speed]** | Cycle playback speed: 0.25× → 0.5× → 1× → 2× | |
||||
|
| **pause** | Pause / resume | |
||||
|
| **black** | Mark item as deleted and close (confirmation required) | |
||||
|
| **trunc** | Truncate item at current position (confirmation required) | |
||||
|
| **cut** | Cut/trim operation | |
||||
|
| **start** | Tap: seek to clip start. Long press: set clip start here | |
||||
|
| **end** | Tap: seek to clip end. Long press: set clip end here | |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Fullscreen Mode |
||||
|
|
||||
|
**Double tap** enters fullscreen: toolbar, controls, and all overlays are hidden. Zoom and pan remain fully active. **Double tap again** or **triple tap** (which also takes a snapshot) exits fullscreen. |
||||
|
|
||||
|
> **Note:** jump mode is disabled in fullscreen — vertical swipes do not skip items. |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Edit Mode |
||||
|
|
||||
|
Enable via **cfg → Edit**. Adds clip trimming controls: |
||||
|
|
||||
|
| Button | Action | |
||||
|
|---|---| |
||||
|
| **edit** | Toggle the trim editor overlay | |
||||
|
| **frame** | Save the current zoom/pan position as a keyframe | |
||||
|
| **snap** | Take a screenshot and copy it to the clipboard | |
||||
|
| **start** (long press) | Set clip start to current playback position | |
||||
|
| **end** (long press) | Set clip end to current playback position | |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue