Twitch SDK (Internal)
Public Types | Public Member Functions | Public Attributes | List of all members
ttv::ChannelListenerProxy Class Reference

#include <ichannellistener.h>

Inheritance diagram for ttv::ChannelListenerProxy:
ttv::IChannelListener

Public Types

using StreamUpCallback = std::function< void(uint32_t durationSeconds)>
 
using StreamDownCallback = std::function< void()>
 
using StreamViewerCountChangedCallback = std::function< void(uint32_t viewerCount)>
 
using StreamTriggeredMidrollCallback = std::function< void(uint32_t durationSeconds)>
 
using StreamReceivedWatchPartyUpdateCallback = std::function< void(const WatchPartyUpdate &update)>
 
using ProfileImageUpdatedCallback = std::function< void(const std::vector< ProfileImage > &images)>
 

Public Member Functions

virtual void StreamUp (uint32_t playDelaySeconds) override
 
virtual void StreamDown () override
 
virtual void StreamViewerCountChanged (uint32_t viewerCount) override
 
virtual void StreamTriggeredMidroll (uint32_t durationSeconds) override
 
virtual void StreamReceivedWatchPartyUpdate (const WatchPartyUpdate &update) override
 
virtual void ProfileImageUpdated (const std::vector< ProfileImage > &images) override
 

Public Attributes

std::function< void(uint32_t viewerCount)> mViewerCountChangedHandler
 
StreamUpCallback streamUpCallback
 
StreamDownCallback streamDownCallback
 
StreamViewerCountChangedCallback streamViewerCountChangedCallback
 
StreamTriggeredMidrollCallback streamTriggeredMidrollCallback
 
StreamReceivedWatchPartyUpdateCallback streamReceivedWatchPartyUpdateCallback
 
ProfileImageUpdatedCallback profileImageUpdatedCallback
 

Detailed Description

A default implementation of IChannelListener that allows an app to plug in lambdas.

Member Typedef Documentation

◆ ProfileImageUpdatedCallback

using ttv::ChannelListenerProxy::ProfileImageUpdatedCallback = std::function<void(const std::vector<ProfileImage>& images)>

◆ StreamDownCallback

using ttv::ChannelListenerProxy::StreamDownCallback = std::function<void()>

◆ StreamReceivedWatchPartyUpdateCallback

◆ StreamTriggeredMidrollCallback

using ttv::ChannelListenerProxy::StreamTriggeredMidrollCallback = std::function<void(uint32_t durationSeconds)>

◆ StreamUpCallback

using ttv::ChannelListenerProxy::StreamUpCallback = std::function<void(uint32_t durationSeconds)>

◆ StreamViewerCountChangedCallback

using ttv::ChannelListenerProxy::StreamViewerCountChangedCallback = std::function<void(uint32_t viewerCount)>

Member Function Documentation

◆ ProfileImageUpdated()

virtual void ttv::ChannelListenerProxy::ProfileImageUpdated ( const std::vector< ProfileImage > &  images)
inlineoverridevirtual

Called when a new profile image has been successfully uploaded for the current channel (from any device). Note: Only successful uploads will trigger this function.

Parameters
[in]imagesUpdated profile image information.

Implements ttv::IChannelListener.

◆ StreamDown()

virtual void ttv::ChannelListenerProxy::StreamDown ( )
inlineoverridevirtual

Called when a stream goes down.

Implements ttv::IChannelListener.

◆ StreamReceivedWatchPartyUpdate()

virtual void ttv::ChannelListenerProxy::StreamReceivedWatchPartyUpdate ( const WatchPartyUpdate update)
inlineoverridevirtual

If the channel is hosting a watch party, the server will send us periodic updates containing information about the watch party.

Implements ttv::IChannelListener.

◆ StreamTriggeredMidroll()

virtual void ttv::ChannelListenerProxy::StreamTriggeredMidroll ( uint32_t  durationSeconds)
inlineoverridevirtual

Indicates that a midroll ad pod should be played. The total length of the ad pod should be at most duration seconds.

Implements ttv::IChannelListener.

◆ StreamUp()

virtual void ttv::ChannelListenerProxy::StreamUp ( uint32_t  playDelaySeconds)
inlineoverridevirtual

Called when a stream is brought up. The playDelay argument contains the artificial playback delay set on the stream.

Implements ttv::IChannelListener.

◆ StreamViewerCountChanged()

virtual void ttv::ChannelListenerProxy::StreamViewerCountChanged ( uint32_t  viewerCount)
inlineoverridevirtual

Called when the stream's viewer count changes.

Implements ttv::IChannelListener.

Member Data Documentation

◆ mViewerCountChangedHandler

std::function<void(uint32_t viewerCount)> ttv::ChannelListenerProxy::mViewerCountChangedHandler

◆ profileImageUpdatedCallback

ProfileImageUpdatedCallback ttv::ChannelListenerProxy::profileImageUpdatedCallback

◆ streamDownCallback

StreamDownCallback ttv::ChannelListenerProxy::streamDownCallback

◆ streamReceivedWatchPartyUpdateCallback

StreamReceivedWatchPartyUpdateCallback ttv::ChannelListenerProxy::streamReceivedWatchPartyUpdateCallback

◆ streamTriggeredMidrollCallback

StreamTriggeredMidrollCallback ttv::ChannelListenerProxy::streamTriggeredMidrollCallback

◆ streamUpCallback

StreamUpCallback ttv::ChannelListenerProxy::streamUpCallback

◆ streamViewerCountChangedCallback

StreamViewerCountChangedCallback ttv::ChannelListenerProxy::streamViewerCountChangedCallback

The documentation for this class was generated from the following file: