Skip to content

Latest commit

 

History

History
168 lines (102 loc) · 5.25 KB

video-player.md

File metadata and controls

168 lines (102 loc) · 5.25 KB

video_player

import "github.com/dueros/bot-sdk-go/bot/directive/video_player"

const.go play.go stop.go

const (
    REPLACE_ALL      = "REPLACE_ALL"
    REPLACE_ENQUEUED = "REPLACE_ENQUEUED"
    ENQUEUE          = "ENQUEUE"
)
type PlayDirective struct {
    directive.BaseDirective
    PlayBehavior string `json:"playBehavior"`
    VideoItem    struct {
        Stream struct {
            Url                  string `json:"url"`
            OffsetInMilliseconds int    `json:"offsetInMilliseconds"`
            ExpiryTime           string `json:"expiryTime,omitempty"`
            ProgressReport       struct {
                ProgressReportDelayInMilliseconds    int `json:"progressReportDelayInMilliseconds,omitempty"`
                ProgressReportIntervalInMilliseconds int `json:"progressReportIntervalInMilliseconds,omitempty"`
            } `json:"progressReport,omitempty"`
            Token                 string `json:"token"`
            ExpectedPreviousToken string `json:"expectedPreviousToken,omitempty"`
        } `json:"stream"`
    } `json:"VideoItem"`
}
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 (this *PlayDirective) SetExpectedPreviousToken(expectedPreviousToken string) *PlayDirective

func (*PlayDirective) SetExpiryTime

func (this *PlayDirective) SetExpiryTime(expiryTime string) *PlayDirective

func (*PlayDirective) SetOffsetInMilliseconds

func (this *PlayDirective) SetOffsetInMilliseconds(milliseconds int) *PlayDirective

func (*PlayDirective) SetReportDelayInMs

func (this *PlayDirective) SetReportDelayInMs(reportDelayInMs int) *PlayDirective

func (*PlayDirective) SetReportIntervalInMs

func (this *PlayDirective) SetReportIntervalInMs(reportIntervalInMs int) *PlayDirective

func (*PlayDirective) SetToken

func (this *PlayDirective) SetToken(token string) *PlayDirective

func (*PlayDirective) SetUrl

func (this *PlayDirective) SetUrl(url string) *PlayDirective
type StopDirective struct {
    directive.BaseDirective
}
func NewStopDirective() *StopDirective

Generated by godoc2md