Major improvements to UnifiedPlayer: 1. GetFrameImage() now works when paused for responsive UI updates 2. Play() method properly starts FFmpeg process 3. Frame display loop runs continuously for smooth video display 4. Disabled audio temporarily to fix video playback fundamentals 5. Simplified FFmpeg command to focus on video stream only Player now: - Generates video frames correctly - Shows video when paused - Has responsive progress tracking - Starts playback properly Next steps: Re-enable audio playback once video is stable
40 lines
1.1 KiB
Go
40 lines
1.1 KiB
Go
package dialog
|
|
|
|
import (
|
|
"image/color"
|
|
|
|
"fyne.io/fyne/v2"
|
|
"fyne.io/fyne/v2/canvas"
|
|
"fyne.io/fyne/v2/container"
|
|
"fyne.io/fyne/v2/theme"
|
|
"fyne.io/fyne/v2/widget"
|
|
)
|
|
|
|
// ProgressDialog is a simple dialog window that displays text and a progress bar.
|
|
//
|
|
// Deprecated: Use NewCustomWithoutButtons() and add a widget.ProgressBar() inside.
|
|
type ProgressDialog struct {
|
|
*dialog
|
|
|
|
bar *widget.ProgressBar
|
|
}
|
|
|
|
// SetValue updates the value of the progress bar - this should be between 0.0 and 1.0.
|
|
func (p *ProgressDialog) SetValue(v float64) {
|
|
p.bar.SetValue(v)
|
|
}
|
|
|
|
// NewProgress creates a progress dialog and returns the handle.
|
|
// Using the returned type you should call Show() and then set its value through SetValue().
|
|
//
|
|
// Deprecated: Use NewCustomWithoutButtons() and add a widget.ProgressBar() inside.
|
|
func NewProgress(title, message string, parent fyne.Window) *ProgressDialog {
|
|
d := newTextDialog(title, message, theme.InfoIcon(), parent)
|
|
bar := widget.NewProgressBar()
|
|
rect := canvas.NewRectangle(color.Transparent)
|
|
rect.SetMinSize(fyne.NewSize(200, 0))
|
|
|
|
d.create(container.NewStack(rect, bar))
|
|
return &ProgressDialog{d, bar}
|
|
}
|