func (c *Camera) Next() error {
	payload := EventStreamPayload{
		Action:          "nextTrack",
		Resource:        "audioPlayback/player",
		PublishResponse: false,
		From:            fmt.Sprintf("%s_%s", c.UserId, TransIdPrefix),
		To:              c.ParentId,
	}
	msg := "failed to skip audio"
	b := c.arlo.Basestations.Find(c.ParentId)
	if b == nil {
		err := fmt.Errorf("basestation (%s) not found for camera (%s)", c.ParentId, c.DeviceId)
		return errors.WithMessage(err, msg)
	}
	if err := b.NotifyEventStream(payload, msg); err != nil {
		return errors.WithMessage(err, msg)
	}
	return nil
}
Next moves audio playback to the next track.
package arlo
import (
	"fmt"
	"time"
	"github.com/pkg/errors"
)
func (c *Camera) SetVolume(volume int) (response *EventStreamResponse, err error) {
	payload := EventStreamPayload{
		Action:          "set",
		Resource:        fmt.Sprintf("cameras/%s", c.DeviceId),
		PublishResponse: true,
		Properties: SpeakerProperties{
			Speaker: VolumeProperties{
				Mute:   false,
				Volume: volume,
			},
		},
		From: fmt.Sprintf("%s_%s", c.UserId, TransIdPrefix),
		To:   c.ParentId,
	}
	msg := "failed to set audio volume"
	b := c.arlo.Basestations.Find(c.ParentId)
	if b == nil {
		err := fmt.Errorf("basestation (%s) not found for camera (%s)", c.ParentId, c.DeviceId)
		return nil, errors.WithMessage(err, msg)
	}
	return b.makeEventStreamRequest(payload, msg)
}
func (c *Camera) Mute() (response *EventStreamResponse, err error) {
	payload := EventStreamPayload{
		Action:          "set",
		Resource:        fmt.Sprintf("cameras/%s", c.DeviceId),
		PublishResponse: true,
		Properties: SpeakerProperties{
			Speaker: VolumeProperties{
				Mute: true,
			},
		},
		From: fmt.Sprintf("%s_%s", c.UserId, TransIdPrefix),
		To:   c.ParentId,
	}
	msg := "failed to mute audio"
	b := c.arlo.Basestations.Find(c.ParentId)
	if b == nil {
		err := fmt.Errorf("basestation (%s) not found for camera (%s)", c.ParentId, c.DeviceId)
		return nil, errors.WithMessage(err, msg)
	}
	return b.makeEventStreamRequest(payload, msg)
}
func (c *Camera) UnMute() (response *EventStreamResponse, err error) {
	payload := EventStreamPayload{
		Action:          "set",
		Resource:        fmt.Sprintf("cameras/%s", c.DeviceId),
		PublishResponse: true,
		Properties: SpeakerProperties{
			Speaker: VolumeProperties{
				Mute: false,
			},
		},
		From: fmt.Sprintf("%s_%s", c.UserId, TransIdPrefix),
		To:   c.ParentId,
	}
	msg := "failed to un-mute audio"
	b := c.arlo.Basestations.Find(c.ParentId)
	if b == nil {
		err := fmt.Errorf("basestation (%s) not found for camera (%s)", c.ParentId, c.DeviceId)
		return nil, errors.WithMessage(err, msg)
	}
	return b.makeEventStreamRequest(payload, msg)
}
func (c *Camera) Play(trackId string, position int) error {
	if trackId == "" {
		trackId = "2391d620-e491-4412-99f6-e9a40d6046ed"
	}
	if position < 0 {
		position = 0
	}
	payload := EventStreamPayload{
		Action:          "playTrack",
		Resource:        "audioPlayback/player",
		PublishResponse: false,
		Properties:      PlayTrackProperties{trackId, position},
		From:            fmt.Sprintf("%s_%s", c.UserId, TransIdPrefix),
		To:              c.ParentId,
	}
	msg := "failed to play audio"
	b := c.arlo.Basestations.Find(c.ParentId)
	if b == nil {
		err := fmt.Errorf("basestation (%s) not found for camera (%s)", c.ParentId, c.DeviceId)
		return errors.WithMessage(err, msg)
	}
	if err := b.NotifyEventStream(payload, msg); err != nil {
		return errors.WithMessage(err, msg)
	}
	return nil
}
func (c *Camera) Pause() error {
	payload := EventStreamPayload{
		Action:          "pause",
		Resource:        "audioPlayback/player",
		PublishResponse: false,
		From:            fmt.Sprintf("%s_%s", c.UserId, TransIdPrefix),
		To:              c.ParentId,
	}
	msg := "failed to pause audio"
	b := c.arlo.Basestations.Find(c.ParentId)
	if b == nil {
		err := fmt.Errorf("basestation (%s) not found for camera (%s)", c.ParentId, c.DeviceId)
		return errors.WithMessage(err, msg)
	}
	if err := b.NotifyEventStream(payload, msg); err != nil {
		return errors.WithMessage(err, msg)
	}
	return nil
}