device

package
v0.0.0-...-b743a0b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	sync.Mutex

	Config       config.Device
	PlaylistData pb.Playlist
	// contains filtered or unexported fields
}

Device the device struct

func NewDevice

func NewDevice(cfg *config.Device) *Device

func (*Device) List

func (d *Device) List(msg *broker.Msg)

List get the list of devices

func (*Device) Play

func (d *Device) Play(ctx context.Context, pl *pb.Playlist)

Play video or image files

func (*Device) PlayTest

func (d *Device) PlayTest(ctx context.Context)

PlayTest play the test patern

func (*Device) Player

func (d *Device) Player()

Player play the files updadted for the playlist

func (*Device) Publish

func (d *Device) Publish(subj string, data []byte) error

Publish a message

func (*Device) Run

func (d *Device) Run()

func (*Device) Status

func (d *Device) Status(msg *nats.Msg)

Status get the status info

func (*Device) Stop

func (d *Device) Stop()

Stop stop the player

func (*Device) Subscribe

func (d *Device) Subscribe(subj string, f func(*nats.Msg)) (*nats.Subscription, error)

Subscribe a topic

func (*Device) Test

func (d *Device) Test(msg *broker.Msg)

Test enable o disable test pattern

func (*Device) Update

func (d *Device) Update(msg *broker.Msg)

Update sync the media files and update the playlist

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL