-
Notifications
You must be signed in to change notification settings - Fork 92
Description
play media file url=http://192.168.0.1/assets/bell.wav
panic: send on closed channel
goroutine 731150 [running]:
github.com/vishen/go-chromecast/cast.(*Connection).handleMessage(0xc000f821b0, 0xb9a, 0xc000cd8c60, 0x16568e0?)
github.com/vishen/go-chromecast@v0.3.4/cast/connection.go:233 +0x151
github.com/vishen/go-chromecast/cast.(*Connection).receiveLoop(0xc000f821b0, {0x1b85860, 0xc000cdc050})
github.com/vishen/go-chromecast@v0.3.4/cast/connection.go:215 +0x532
created by github.com/vishen/go-chromecast/cast.(*Connection).Start in goroutine 731131
github.com/vishen/go-chromecast@v0.3.4/cast/connection.go:70 +0xd6
The code is trivial:
applicationOptions := []application.ApplicationOption{
application.WithDebug(true),
application.WithCacheDisabled(true),
}
client := application.NewApplication(applicationOptions...)
if err := client.Start(cThing.Config.CastIp, cThing.Config.Port); err != nil {
return err
}
defer client.Close(true)
url := fmt.Sprintf("%s/%s", cThing.Config.AssetsUrl, mediaFile)
startTime := 0
contentType := ""
transcode := false
detach := false
err = client.Load(url, startTime, contentType, transcode, detach, false)
if err != nil {
return err
}