rewrite using IoC and DI

This commit is contained in:
Aynakeya
2022-12-23 05:06:57 -08:00
parent 0498d2dbf3
commit c47d338a9e
88 changed files with 2295 additions and 1856 deletions

View File

@@ -1,6 +1,7 @@
package player
import (
"AynaLivePlayer/model"
"fmt"
"github.com/aynakeya/go-mpv"
"testing"
@@ -18,7 +19,7 @@ func TestPlayer(t *testing.T) {
player.ObserveProperty("percent-pos", func(property *mpv.EventProperty) {
fmt.Println(2, property.Data)
})
player.Play(&Media{
player.Play(&model.Media{
Url: "https://ia600809.us.archive.org/19/items/VillagePeopleYMCAOFFICIALMusicVideo1978/Village%20People%20-%20YMCA%20OFFICIAL%20Music%20Video%201978.mp4",
})
time.Sleep(time.Second * 15)