Skip to content

Commit

Permalink
Don't send mediaSessionId with LOAD requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
barnybug committed Apr 3, 2016
1 parent 4ca29fe commit 02384fa
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions controllers/media.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type MediaCommand struct {
}

type LoadMediaCommand struct {
MediaCommand
net.PayloadHeaders
Media MediaItem `json:"media"`
CurrentTime int `json:"currentTime"`
Autoplay bool `json:"autoplay"`
Expand Down Expand Up @@ -172,14 +172,11 @@ func (c *MediaController) Stop(ctx context.Context) (*api.CastMessage, error) {

func (c *MediaController) LoadMedia(ctx context.Context, media MediaItem, currentTime int, autoplay bool, customData interface{}) (*api.CastMessage, error) {
message, err := c.channel.Request(ctx, &LoadMediaCommand{
MediaCommand: MediaCommand{
PayloadHeaders: commandMediaLoad,
MediaSessionID: c.MediaSessionID,
},
Media: media,
CurrentTime: currentTime,
Autoplay: autoplay,
CustomData: customData,
PayloadHeaders: commandMediaLoad,
Media: media,
CurrentTime: currentTime,
Autoplay: autoplay,
CustomData: customData,
})
if err != nil {
return nil, fmt.Errorf("Failed to send load command: %s", err)
Expand Down

0 comments on commit 02384fa

Please sign in to comment.