Documentation ¶
Index ¶
- Constants
- type PlayDirective
- func (this *PlayDirective) GetToken(token string) string
- func (this *PlayDirective) SetBehavior(behavior string) *PlayDirective
- func (this *PlayDirective) SetOffsetInMilliseconds(milliseconds int) *PlayDirective
- func (this *PlayDirective) SetPlayerInfo(playerInfo *PlayerInfo) *PlayDirective
- func (this *PlayDirective) SetProgressReportIntervalMs(intervalMs int) *PlayDirective
- func (this *PlayDirective) SetStreamFormat(format string) *PlayDirective
- func (this *PlayDirective) SetToken(token string) *PlayDirective
- func (this *PlayDirective) SetUrl(url string) *PlayDirective
- type PlayerInfo
- func (this *PlayerInfo) SetArt(src string) *PlayerInfo
- func (this *PlayerInfo) SetLyric(url string) *PlayerInfo
- func (this *PlayerInfo) SetMediaLengthInMs(length uint64) *PlayerInfo
- func (this *PlayerInfo) SetProviderLogo(logo string) *PlayerInfo
- func (this *PlayerInfo) SetProviderName(name string) *PlayerInfo
- func (this *PlayerInfo) SetTitle(title string) *PlayerInfo
- func (this *PlayerInfo) SetTitleSubtext1(text string) *PlayerInfo
- func (this *PlayerInfo) SetTitleSubtext2(text string) *PlayerInfo
- type StopDirective
Constants ¶
View Source
const ( REPLACE_ALL = "REPLACE_ALL" REPLACE_ENQUEUED = "REPLACE_ENQUEUED" ENQUEUE = "ENQUEUE" AUDIO_MP3 = "AUDIO_MP3" AUDIO_M3U8 = "AUDIO_M3U8" AUDIO_M4A = "AUDIO_M4A" AUDIO_TYPE_MUSIC = "MUSIC" LYRIC_FORMAT_LRC = "LRC" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PlayDirective ¶
type PlayDirective struct { directive.BaseDirective PlayBehavior string `json:"playBehavior"` AudioItem struct { Stream struct { Url string `json:"url"` StreamFormat string `json:"streamFormat"` OffsetInMilliseconds int `json:"offsetInMilliSeconds"` Token string `json:"token"` ProgressReportIntervalMs int `json:"progressReportIntervalMs,omitempty"` } `json:"stream"` PlayerInfo *PlayerInfo `json:"playerInfo,omitempty"` } `json:"audioItem"` }
func NewPlayDirective ¶
func NewPlayDirective(url string) *PlayDirective
func (*PlayDirective) GetToken ¶
func (this *PlayDirective) GetToken(token string) string
func (*PlayDirective) SetBehavior ¶
func (this *PlayDirective) SetBehavior(behavior string) *PlayDirective
func (*PlayDirective) SetOffsetInMilliseconds ¶
func (this *PlayDirective) SetOffsetInMilliseconds(milliseconds int) *PlayDirective
func (*PlayDirective) SetPlayerInfo ¶
func (this *PlayDirective) SetPlayerInfo(playerInfo *PlayerInfo) *PlayDirective
func (*PlayDirective) SetProgressReportIntervalMs ¶
func (this *PlayDirective) SetProgressReportIntervalMs(intervalMs int) *PlayDirective
func (*PlayDirective) SetStreamFormat ¶
func (this *PlayDirective) SetStreamFormat(format string) *PlayDirective
func (*PlayDirective) SetToken ¶
func (this *PlayDirective) SetToken(token string) *PlayDirective
func (*PlayDirective) SetUrl ¶
func (this *PlayDirective) SetUrl(url string) *PlayDirective
type PlayerInfo ¶
type PlayerInfo struct { Content struct { AudioItemType string `json:"audioItemType"` Title string `json:"title"` TitleSubtext1 string `json:"titleSubtext1"` TitleSubtext2 string `json:"titleSubtext2"` Lyric struct { Url string `json:"url"` Format string `json:"format"` } `json:"lyric"` MediaLengthInMilliseconds uint64 `json:"mediaLengthInMilliseconds,omitempty"` Art struct { Src string `json:"src"` } `json:"art"` Provider struct { Name string `json:"name"` Logo struct { Src string `json:"src"` } `json:"logo"` } `json:"provider"` } `json:"content"` }
func NewPlayerInfo ¶
func NewPlayerInfo() *PlayerInfo
func (*PlayerInfo) SetArt ¶
func (this *PlayerInfo) SetArt(src string) *PlayerInfo
func (*PlayerInfo) SetLyric ¶
func (this *PlayerInfo) SetLyric(url string) *PlayerInfo
func (*PlayerInfo) SetMediaLengthInMs ¶
func (this *PlayerInfo) SetMediaLengthInMs(length uint64) *PlayerInfo
func (*PlayerInfo) SetProviderLogo ¶
func (this *PlayerInfo) SetProviderLogo(logo string) *PlayerInfo
func (*PlayerInfo) SetProviderName ¶
func (this *PlayerInfo) SetProviderName(name string) *PlayerInfo
func (*PlayerInfo) SetTitle ¶
func (this *PlayerInfo) SetTitle(title string) *PlayerInfo
func (*PlayerInfo) SetTitleSubtext1 ¶
func (this *PlayerInfo) SetTitleSubtext1(text string) *PlayerInfo
func (*PlayerInfo) SetTitleSubtext2 ¶
func (this *PlayerInfo) SetTitleSubtext2(text string) *PlayerInfo
type StopDirective ¶
type StopDirective struct {
directive.BaseDirective
}
func NewStopDirective ¶
func NewStopDirective() *StopDirective
Click to show internal directories.
Click to hide internal directories.