2021-12-12 14:36:46 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fyne.io/fyne/v2"
|
|
|
|
"fyne.io/fyne/v2/app"
|
|
|
|
"fyne.io/fyne/v2/container"
|
|
|
|
"fyne.io/fyne/v2/widget"
|
|
|
|
"git.martyn.berlin/martyn/fyne-widgets/pkg/layouts"
|
|
|
|
"git.martyn.berlin/martyn/fyne-widgets/pkg/vidplayback"
|
|
|
|
)
|
|
|
|
|
|
|
|
var videoWidget *vidplayback.VidPlayback
|
|
|
|
|
|
|
|
func unimplemented() {}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
a := app.New()
|
|
|
|
w := a.NewWindow("Video")
|
|
|
|
|
|
|
|
videoWidget = vidplayback.NewVidPlayback()
|
2021-12-12 17:14:12 +00:00
|
|
|
videoWidget.VideoFilename = "1 Minute Timer-CH50zuS8DD0.mp4"
|
2021-12-12 14:36:46 +00:00
|
|
|
layout := layouts.NewFloatingControlsLayout()
|
|
|
|
layout.FloatingControlsLocation = layouts.FloatingControlsCenter
|
|
|
|
|
|
|
|
buttons := container.NewHBox(widget.NewButton(">", func() { videoWidget.Play() }), widget.NewButton("[]", unimplemented))
|
|
|
|
|
|
|
|
w.SetContent(container.New(&layout, videoWidget, buttons))
|
|
|
|
w.Resize(fyne.NewSize(640, 480))
|
|
|
|
w.ShowAndRun()
|
|
|
|
}
|