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
34 lines
854 B
Go
34 lines
854 B
Go
//go:build !tamago && !noos
|
|
|
|
package test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"fyne.io/fyne/v2"
|
|
)
|
|
|
|
// AssertNotificationSent allows an app developer to assert that a notification was sent.
|
|
// After the content of f has executed this utility will check that the specified notification was sent.
|
|
func AssertNotificationSent(t *testing.T, n *fyne.Notification, f func()) {
|
|
require.NotNil(t, f, "function has to be specified")
|
|
require.IsType(t, &app{}, fyne.CurrentApp())
|
|
a := fyne.CurrentApp().(*app)
|
|
a.lastNotification = nil
|
|
|
|
f()
|
|
if n == nil {
|
|
assert.Nil(t, a.lastNotification)
|
|
return
|
|
} else if a.lastNotification == nil {
|
|
t.Error("No notification sent")
|
|
return
|
|
}
|
|
|
|
assert.Equal(t, n.Title, a.lastNotification.Title)
|
|
assert.Equal(t, n.Content, a.lastNotification.Content)
|
|
}
|