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
48 lines
1004 B
Go
48 lines
1004 B
Go
package app
|
|
|
|
import "fyne.io/fyne/v2"
|
|
|
|
func (a *fyneApp) SetCloudProvider(p fyne.CloudProvider) {
|
|
if p == nil {
|
|
a.cloud = nil
|
|
return
|
|
}
|
|
|
|
a.transitionCloud(p)
|
|
}
|
|
|
|
func (a *fyneApp) transitionCloud(p fyne.CloudProvider) {
|
|
if a.cloud != nil {
|
|
a.cloud.Cleanup(a)
|
|
}
|
|
|
|
err := p.Setup(a)
|
|
if err != nil {
|
|
fyne.LogError("Failed to set up cloud provider "+p.ProviderName(), err)
|
|
return
|
|
}
|
|
a.cloud = p
|
|
|
|
listeners := a.prefs.ChangeListeners()
|
|
if pp, ok := p.(fyne.CloudProviderPreferences); ok {
|
|
a.prefs = pp.CloudPreferences(a)
|
|
} else {
|
|
a.prefs = a.newDefaultPreferences()
|
|
}
|
|
if cloud, ok := p.(fyne.CloudProviderStorage); ok {
|
|
a.storage = cloud.CloudStorage(a)
|
|
} else {
|
|
store := &store{a: a}
|
|
store.Docs = makeStoreDocs(a.uniqueID, store)
|
|
a.storage = store
|
|
}
|
|
|
|
for _, l := range listeners {
|
|
a.prefs.AddChangeListener(l)
|
|
l() // assume that preferences have changed because we replaced the provider
|
|
}
|
|
|
|
// after transition ensure settings listener is fired
|
|
a.settings.apply()
|
|
}
|