SinricPro Library
Loading...
Searching...
No Matches
MediaController< T >

MediaController. More...

#include <MediaController.h>

Inheritance diagram for MediaController< T >:

Public Member Functions

void onMediaControl (MediaControlCallback cb)
 Set callback function for mediaControl request.
 
bool sendMediaControlEvent (String mediaControl, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send mediaControl event to SinricPro Server indicating devices media control state.
 

Detailed Description

template<typename T>
class SINRICPRO_3_0_0::MediaController< T >

MediaController.

Member Function Documentation

◆ onMediaControl()

template<typename T >
void onMediaControl ( MediaControlCallback  cb)

Set callback function for mediaControl request.

Parameters
cbFunction pointer to a MediaControlCallback function
Returns
void
See also
MediaControlCallback

◆ sendMediaControlEvent()

template<typename T >
bool sendMediaControlEvent ( String  mediaControl,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)

Send mediaControl event to SinricPro Server indicating devices media control state.

Parameters
mediaControlString with actual media control
FastForward, Next, Pause, Play, Previous, Rewind, StartOver, Stop
cause(optional) String reason why event is sent (default = "PHYSICAL_INTERACTION")
Returns
the success of sending the even
Return values
trueevent has been sent successfully
falseevent has not been sent, maybe you sent to much events in a short distance of time