forked from Leak_Technologies/VideoTools
Compare commits
2 Commits
792e5a6a5a
...
eb2a7a4297
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb2a7a4297 | ||
|
|
5e902262c5 |
30
main.go
30
main.go
|
|
@ -1068,33 +1068,9 @@ func (s *appState) showPlayerView() {
|
|||
})
|
||||
}
|
||||
|
||||
// Add tappable overlay to stage for video interactions
|
||||
// Double-click toggles fullscreen, right-click plays/pauses
|
||||
videoTapper := ui.NewTappableOverlay(
|
||||
nil, // Single tap does nothing for now
|
||||
func() {
|
||||
// Double-tap: toggle fullscreen
|
||||
s.toggleFullscreen()
|
||||
},
|
||||
func() {
|
||||
// Right-click: toggle play/pause
|
||||
if !ensureSession() {
|
||||
return
|
||||
}
|
||||
if s.playerPaused {
|
||||
s.playSess.Play()
|
||||
s.playerPaused = false
|
||||
playBtn.SetText(ui.IconPause)
|
||||
} else {
|
||||
s.playSess.Pause()
|
||||
s.playerPaused = true
|
||||
playBtn.SetText(ui.IconPlayArrow)
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
// Add tapper to stage
|
||||
stage.Objects = append(stage.Objects, videoTapper)
|
||||
// TODO: Implement overlay controls that float over video (auto-hide after 3s inactivity)
|
||||
// Previously had TappableOverlay here but it blocked all button clicks
|
||||
// Need to redesign so controls overlay the video without blocking interaction
|
||||
|
||||
playerArea = container.NewBorder(
|
||||
nil,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
# VT_Player Build Script
|
||||
# Cleans dependencies and builds the application with proper error handling
|
||||
# Builds the application with proper dependency checking
|
||||
|
||||
set -e
|
||||
|
||||
|
|
@ -25,16 +25,54 @@ echo ""
|
|||
# Change to project directory
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
echo "🧹 Cleaning previous builds and cache..."
|
||||
go clean -cache -modcache -testcache 2>/dev/null || true
|
||||
rm -f "$BUILD_OUTPUT" 2>/dev/null || true
|
||||
echo "✓ Cache cleaned"
|
||||
# Check for system dependencies (X11 development libraries)
|
||||
echo "🔍 Checking system dependencies..."
|
||||
MISSING_DEPS=()
|
||||
|
||||
# Check for essential X11 libraries needed by Fyne/GLFW
|
||||
if ! pkg-config --exists x11 2>/dev/null; then
|
||||
MISSING_DEPS+=("libX11-devel")
|
||||
fi
|
||||
if ! pkg-config --exists xcursor 2>/dev/null; then
|
||||
MISSING_DEPS+=("libXcursor-devel")
|
||||
fi
|
||||
if ! pkg-config --exists xrandr 2>/dev/null; then
|
||||
MISSING_DEPS+=("libXrandr-devel")
|
||||
fi
|
||||
if ! pkg-config --exists gl 2>/dev/null; then
|
||||
MISSING_DEPS+=("mesa-libGL-devel")
|
||||
fi
|
||||
|
||||
if [ ${#MISSING_DEPS[@]} -gt 0 ]; then
|
||||
echo "⚠️ Missing system dependencies: ${MISSING_DEPS[*]}"
|
||||
echo "📥 Attempting to install dependencies..."
|
||||
|
||||
if [ -f "$PROJECT_ROOT/scripts/install-deps-linux.sh" ]; then
|
||||
bash "$PROJECT_ROOT/scripts/install-deps-linux.sh" || {
|
||||
echo "❌ Failed to install dependencies automatically"
|
||||
echo "Please run: sudo bash $PROJECT_ROOT/scripts/install-deps-linux.sh"
|
||||
exit 1
|
||||
}
|
||||
else
|
||||
echo "❌ Dependency installer not found"
|
||||
echo "Please install missing packages manually: ${MISSING_DEPS[*]}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "✓ System dependencies OK"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
echo "⬇️ Downloading and verifying dependencies..."
|
||||
echo "🧹 Cleaning previous build..."
|
||||
rm -f "$BUILD_OUTPUT" 2>/dev/null || true
|
||||
go clean 2>/dev/null || true
|
||||
echo "✓ Cleaned"
|
||||
echo ""
|
||||
|
||||
echo "⬇️ Ensuring Go modules are downloaded..."
|
||||
go mod download
|
||||
go mod verify
|
||||
echo "✓ Dependencies verified"
|
||||
echo "✓ Dependencies ready"
|
||||
echo ""
|
||||
|
||||
echo "🔨 Building VT_Player..."
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user