Twitch SDK (Internal)
Public Member Functions | Protected Attributes | List of all members
ttv::binding::java::JavaBroadcastAPIListenerProxy Class Reference

#include <java_broadcastapilistenerproxy.h>

Inheritance diagram for ttv::binding::java::JavaBroadcastAPIListenerProxy:
ttv::binding::java::NativeModuleListener< IBroadcastAPIListener > ttv::binding::java::NativeListenerProxy< IBroadcastAPIListener > ttv::broadcast::IBroadcastAPIListener ttv::IModuleListener

Public Member Functions

 JavaBroadcastAPIListenerProxy (jobject jModule)
 
virtual void BroadcastStateChanged (TTV_ErrorCode ec, BroadcastState state) override
 
virtual void BroadcastBandwidthWarning (TTV_ErrorCode ec, uint32_t backupMilliseconds) override
 
virtual void BroadcastFrameSubmissionIssue (TTV_ErrorCode ec) override
 
virtual void StreamInfoFetched (TTV_ErrorCode ec, const StreamInfo &streamInfo) override
 
virtual void ModuleStateChanged (ttv::IModule *, ttv::IModule::State state, TTV_ErrorCode ec) override
 
void SetListener (jobject jListener)
 
jobject GetListener () const
 

Protected Attributes

GlobalJavaObjectReference mJavaModule
 
JavaClassInfo mModuleListenerInfo
 
GlobalJavaObjectReference mJavaListener
 
JavaClassInfo mListenerInfo
 

Constructor & Destructor Documentation

◆ JavaBroadcastAPIListenerProxy()

ttv::binding::java::JavaBroadcastAPIListenerProxy::JavaBroadcastAPIListenerProxy ( jobject  jModule)

Member Function Documentation

◆ BroadcastBandwidthWarning()

virtual void ttv::binding::java::JavaBroadcastAPIListenerProxy::BroadcastBandwidthWarning ( TTV_ErrorCode  ec,
uint32_t  backupMilliseconds 
)
overridevirtual

Fired periodically when there are issues with the user's bandwidth while broadcasting. If the connection backs up too much then a proper error wil be issues and the broadcast will automatically terminate. If/when issues have recovered then TTV_EC_SUCCESS will be fired once to clear the warning state.

Parameters
ecThe severity of the warning. Possible values are TTV_WRN_BROADCAST_FRAMES_QUEUEING, TTV_EC_BROADCAST_FRAME_QUEUE_TOO_LONG and TTV_EC_SUCCESS.
backupMillisecondsThe number of milliseconds which are backed up on the connection.

Implements ttv::broadcast::IBroadcastAPIListener.

◆ BroadcastFrameSubmissionIssue()

virtual void ttv::binding::java::JavaBroadcastAPIListenerProxy::BroadcastFrameSubmissionIssue ( TTV_ErrorCode  ec)
overridevirtual

◆ BroadcastStateChanged()

virtual void ttv::binding::java::JavaBroadcastAPIListenerProxy::BroadcastStateChanged ( TTV_ErrorCode  ec,
BroadcastState  state 
)
overridevirtual

Fired when the state of the broadcast changes for any reason. If the BroadcastState is Stopping, we will return TTV_EC_SUCCESS if it was a solicited stop (from a call to StopBroadcast). Otherwise it will reflect the underlying error that caused the broadcast to end. Some examples include: TTV_EC_SOCKET_ENOTCONN, TTV_EC_SOCKET_ECONNABORTED, TTV_EC_SOCKET_SEND_ERROR, TTV_EC_SOCKET_RECV_ERROR Socket failures when communicating with the server. TTV_EC_BROADCAST_RTMP_TIMEOUT Server stopped responding to our RTMP data. This can happen if there is another broadcasting session running. TTV_EC_HTTPREQUEST_ERROR HTTP failure when attempting to fetch some of the channel data for the stream.

Implements ttv::broadcast::IBroadcastAPIListener.

◆ GetListener()

jobject ttv::binding::java::NativeListenerProxy< IBroadcastAPIListener >::GetListener ( ) const
inlineinherited

◆ ModuleStateChanged()

virtual void ttv::binding::java::NativeModuleListener< IBroadcastAPIListener >::ModuleStateChanged ( ttv::IModule source,
ttv::IModule::State  state,
TTV_ErrorCode  ec 
)
inlineoverridevirtualinherited

Implements ttv::IModuleListener.

◆ SetListener()

void ttv::binding::java::NativeListenerProxy< IBroadcastAPIListener >::SetListener ( jobject  jListener)
inlineinherited

◆ StreamInfoFetched()

virtual void ttv::binding::java::JavaBroadcastAPIListenerProxy::StreamInfoFetched ( TTV_ErrorCode  ec,
const StreamInfo streamInfo 
)
overridevirtual

Fired when we get the broadcast_id from the livecheck API. The broadcast_id (also known as stream_id) is the id of the stream that the user is current broadcasting. This should fire 5-20s after the broadcast starts once we get the broadcast_id from the livecheck API, but could take a while due to latency (10s~) on the endpoint.

The callback may not be called if the broadcast stops before we have a chance to fetch it.

Implements ttv::broadcast::IBroadcastAPIListener.

Member Data Documentation

◆ mJavaListener

◆ mJavaModule

◆ mListenerInfo

◆ mModuleListenerInfo


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