Package im.zego.zegoexpress.internal
Class ZegoRealTimeSequentialDataManagerInternalImpl
- java.lang.Object
-
- im.zego.zegoexpress.ZegoRealTimeSequentialDataManager
-
- im.zego.zegoexpress.internal.ZegoRealTimeSequentialDataManagerInternalImpl
-
public final class ZegoRealTimeSequentialDataManagerInternalImpl extends ZegoRealTimeSequentialDataManager
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.concurrent.ConcurrentHashMap<ZegoRealTimeSequentialDataManager,im.zego.zegoexpress.internal.ZegoRealTimeSequentialDataManagerInternalImpl.IdxAndHandler>
idxAndEventHandler
static android.os.Handler
uiHandler
-
Constructor Summary
Constructors Constructor Description ZegoRealTimeSequentialDataManagerInternalImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ZegoRealTimeSequentialDataManager
createRealTimeSequentialDataManager(java.lang.String roomID)
static int
createRealTimeSequentialDataManagerJni(java.lang.String roomID)
static void
destroyRealTimeSequentialDataManager(ZegoRealTimeSequentialDataManager manager)
static int
destroyRealTimeSequentialDataManagerJni(int index)
int
getIndex()
Get real-time sequential data manager index.static void
onRealTimeSequentialDataSent(int index, int errorCode, int seq)
static void
onReceiveRealTimeSequentialData(int index, byte[] data, java.lang.String streamID)
void
sendRealTimeSequentialData(byte[] data, java.lang.String streamID, IZegoRealTimeSequentialDataSentCallback callback)
Send real-time sequential data to the broadcasting stream ID.static int
sendRealTimeSequentialDataJni(int index, byte[] data, java.lang.String streamID)
void
setEventHandler(IZegoRealTimeSequentialDataEventHandler handler)
Sets up the real-time sequential data event handler.void
startBroadcasting(java.lang.String streamID)
Start broadcasting real-time sequential data stream.static int
startBroadcastingJni(int index, java.lang.String streamID)
void
startSubscribing(java.lang.String streamID)
Start subscribing real-time sequential data stream.static int
startSubscribingJni(int index, java.lang.String streamID)
void
stopBroadcasting(java.lang.String streamID)
Stop broadcasting real-time sequential data stream.static int
stopBroadcastingJni(int index, java.lang.String streamID)
void
stopSubscribing(java.lang.String streamID)
Stop subscribing real-time sequential data stream.static int
stopSubscribingJni(int index, java.lang.String streamID)
-
-
-
Field Detail
-
uiHandler
public static android.os.Handler uiHandler
-
idxAndEventHandler
public static java.util.concurrent.ConcurrentHashMap<ZegoRealTimeSequentialDataManager,im.zego.zegoexpress.internal.ZegoRealTimeSequentialDataManagerInternalImpl.IdxAndHandler> idxAndEventHandler
-
-
Method Detail
-
createRealTimeSequentialDataManager
public static ZegoRealTimeSequentialDataManager createRealTimeSequentialDataManager(java.lang.String roomID)
-
destroyRealTimeSequentialDataManager
public static void destroyRealTimeSequentialDataManager(ZegoRealTimeSequentialDataManager manager)
-
setEventHandler
public void setEventHandler(IZegoRealTimeSequentialDataEventHandler handler)
Description copied from class:ZegoRealTimeSequentialDataManager
Sets up the real-time sequential data event handler. Available since: 2.14.0 Description: Set up real-time sequential data callback to monitor callbacks such as sending data results, receiving data, etc. When to call:After create the [ZegoRealTimeSequentialDataManager] instance. Restrictions: None. Caution: Calling this function will overwrite the callback set by the last call to this function.- Specified by:
setEventHandler
in classZegoRealTimeSequentialDataManager
- Parameters:
handler
- Event handler for real-time sequential data
-
startBroadcasting
public void startBroadcasting(java.lang.String streamID)
Description copied from class:ZegoRealTimeSequentialDataManager
Start broadcasting real-time sequential data stream. Available since: 2.14.0 Description: This function allows users to broadcast their local real-time sequential data stream to the ZEGO RTC server, and other users in the same room can subscribe to the real-time sequential data stream for intercommunication through "streamID". Use cases: Before sending real-time sequential data, you need to call this function to start broadcasting. When to call: After creating the [ZegoRealTimeSequentialDataManager] instance. Restrictions: None. Caution: After calling this function, you will receive the [onPublisherStateUpdate] callback to tell you the broadcast state (publish state) of this stream. After the broadcast is successful, other users in the same room will receive the [onRoomStreamUpdate] callback to tell them this stream has been added to the room.- Specified by:
startBroadcasting
in classZegoRealTimeSequentialDataManager
- Parameters:
streamID
- Stream ID, a string of up to 256 characters. Caution: 1. Need to be globally unique within the entire AppID (Note that it cannot be the same as the stream ID passed in [startPublishingStream]). If in the same AppID, different users publish each stream and the stream ID is the same, which will cause the user to publish the stream failure. You cannot include URL keywords, otherwise publishing stream and playing stream will fails. 2. Only support numbers, English characters and '-', '_'.
-
stopBroadcasting
public void stopBroadcasting(java.lang.String streamID)
Description copied from class:ZegoRealTimeSequentialDataManager
Stop broadcasting real-time sequential data stream. Available since: 2.14.0 Description: This function allows users to stop broadcasting their local real-time sequential data stream. Use cases: When you no longer need to send real-time sequential data, you need to call this function to stop broadcasting. When to call: After creating the [ZegoRealTimeSequentialDataManager] instance. Restrictions: None. Caution: After calling this function, you will receive the [onPublisherStateUpdate] callback to tell you the broadcast state (publish state) of this stream. After stopping the broadcast, other users in the same room will receive the [onRoomStreamUpdate] callback to tell them this stream has been deleted from the room.- Specified by:
stopBroadcasting
in classZegoRealTimeSequentialDataManager
- Parameters:
streamID
- The ID of the stream that needs to stop broadcasting.
-
sendRealTimeSequentialData
public void sendRealTimeSequentialData(byte[] data, java.lang.String streamID, IZegoRealTimeSequentialDataSentCallback callback)
Description copied from class:ZegoRealTimeSequentialDataManager
Send real-time sequential data to the broadcasting stream ID. Available since: 2.14.0 Description: This function can be used to send real-time sequential data on the stream currently being broadcast. Use cases: You need to call this function when you need to send real-time sequential data. When to call: After calling [startBroadcasting]. Restrictions: None. Caution: None.- Specified by:
sendRealTimeSequentialData
in classZegoRealTimeSequentialDataManager
- Parameters:
data
- The real-time sequential data to be sent.streamID
- The stream ID to which the real-time sequential data is sent.callback
- Send real-time sequential data result callback.
-
startSubscribing
public void startSubscribing(java.lang.String streamID)
Description copied from class:ZegoRealTimeSequentialDataManager
Start subscribing real-time sequential data stream. Available since: 2.14.0 Description: This function allows users to subscribe to the real-time sequential data stream of remote users from the ZEGO RTC server. Use cases: When you need to receive real-time sequential data sent from other remote users, you need to call this function to start subscribing to the stream broadcasted by other remote users. When to call: After creating the [ZegoRealTimeSequentialDataManager] instance. Restrictions: None. Caution: After calling this function, you will receive the [onPlayerStateUpdate] callback to tell you the subscribe state (play state) of this stream.- Specified by:
startSubscribing
in classZegoRealTimeSequentialDataManager
- Parameters:
streamID
- Stream ID, a string of up to 256 characters. Caution: Only support numbers, English characters and '-', '_'.
-
stopSubscribing
public void stopSubscribing(java.lang.String streamID)
Description copied from class:ZegoRealTimeSequentialDataManager
Stop subscribing real-time sequential data stream. Available since: 2.14.0 Description: This function can be used to stop subscribing to the real-time sequential data stream. Use cases: When you no longer need to receive real-time sequential data sent by other users, you need to call this function to stop subscribing to the other user's stream. When to call: After creating the [ZegoRealTimeSequentialDataManager] instance. Restrictions: None. Caution: After calling this function, you will receive the [onPlayerStateUpdate] callback to tell you the subscribe state (play state) of this stream.- Specified by:
stopSubscribing
in classZegoRealTimeSequentialDataManager
- Parameters:
streamID
- The ID of the stream that needs to stop subscribing.
-
getIndex
public int getIndex()
Description copied from class:ZegoRealTimeSequentialDataManager
Get real-time sequential data manager index.- Specified by:
getIndex
in classZegoRealTimeSequentialDataManager
- Returns:
- Index of the real-time sequential data manager.
-
createRealTimeSequentialDataManagerJni
public static int createRealTimeSequentialDataManagerJni(java.lang.String roomID)
-
destroyRealTimeSequentialDataManagerJni
public static int destroyRealTimeSequentialDataManagerJni(int index)
-
startBroadcastingJni
public static int startBroadcastingJni(int index, java.lang.String streamID)
-
stopBroadcastingJni
public static int stopBroadcastingJni(int index, java.lang.String streamID)
-
sendRealTimeSequentialDataJni
public static int sendRealTimeSequentialDataJni(int index, byte[] data, java.lang.String streamID)
-
startSubscribingJni
public static int startSubscribingJni(int index, java.lang.String streamID)
-
stopSubscribingJni
public static int stopSubscribingJni(int index, java.lang.String streamID)
-
onReceiveRealTimeSequentialData
public static void onReceiveRealTimeSequentialData(int index, byte[] data, java.lang.String streamID)
-
onRealTimeSequentialDataSent
public static void onRealTimeSequentialDataSent(int index, int errorCode, int seq)
-
-