Live stream Post

Prior to creating a live stream post, it is crucial to create the live stream that will be included in the post data to ensure that the necessary information is accessible and can be linked to the post. This requires creating the live stream first, to obtain the data that will be used in creating the live stream post. For more information regarding live stream, please refer to #live-stream

As demonstrated in the code sample below, here's a way to create a live stream.

Upon successful completion of the live stream process, you can include the stream ID as a parameter when creating a live stream post, as demonstrated in the code sample below.

Here's an explanation of the method's parameters:

  • text: This is a required parameter of type String, which represents the text content of the new post. You can pass in any text you want to include in the post, up to a maximum length of 20,000 characters.

  • streamId: The ID of the created live stream to include in a post.

  • targetType - Type of the target, either a particular community or a user feed.

  • tags - Arbitrary strings that can be used for defining and querying for the posts.

  • metaData - Additional properties to support custom fields.

You can create a livestream post via AmityLiveStreamPostBuilder .

AmityLiveStreamPostBuilder creates a text post and attaches a stream post as a first child. This builder requires the stream object id.

Last updated