Class PlaybackStreamService

java.lang.Object
com.bitheads.braincloud.services.PlaybackStreamService

public class PlaybackStreamService
extends Object
  • Constructor Details

    • PlaybackStreamService

      public PlaybackStreamService​(BrainCloudClient client)
  • Method Details

    • startStream

      public void startStream​(String targetPlayerId, boolean includeSharedData, IServerCallback callback)
      Starts a stream Service Name - PlaybackStream Service Operation - StartStream
      Parameters:
      targetPlayerId - The player to start a stream with
      includeSharedData - Whether to include shared data in the stream
      callback - The callback.
    • readStream

      public void readStream​(String playbackStreamId, IServerCallback callback)
      Reads a stream Service Name - PlaybackStream Service Operation - ReadStream
      Parameters:
      playbackStreamId - Identifies the stream to read
      callback - The callback.
    • endStream

      public void endStream​(String playbackStreamId, IServerCallback callback)
      Ends a stream Service Name - PlaybackStream Service Operation - EndStream
      Parameters:
      playbackStreamId - Identifies the stream to read
      callback - The callback.
    • deleteStream

      public void deleteStream​(String playbackStreamId, IServerCallback callback)
      Deletes a stream Service Name - PlaybackStream Service Operation - DeleteStream
      Parameters:
      playbackStreamId - Identifies the stream to read
      callback - The callback.
    • addEvent

      public void addEvent​(String playbackStreamId, String eventData, String summary, IServerCallback callback)
      Adds a stream event Service Name - PlaybackStream Service Operation - AddEvent
      Parameters:
      playbackStreamId - Identifies the stream to read
      eventData - Describes the event
      summary - Current summary data as of this event
      callback - The callback.
    • getRecentStreamsForInitiatingPlayer

      public void getRecentStreamsForInitiatingPlayer​(String initiatingPlayerId, int maxNumStreams, IServerCallback callback)
      Gets recent stream summaries for initiating player Service Name - PlaybackStream Service Operation - GetRecentStreamsForInitiatingPlayer
      Parameters:
      initiatingPlayerId - The player that started the stream
      maxNumStreams - The max number of streams to query
      callback - The callback.
    • getRecentStreamsForTargetPlayer

      public void getRecentStreamsForTargetPlayer​(String targetPlayerId, int maxNumStreams, IServerCallback callback)
      Gets recent stream summaries for target player Service Name - PlaybackStream Service Operation - GetRecentStreamsForTargetPlayer
      Parameters:
      targetPlayerId - The player that was target of the stream
      maxNumStreams - The max number of streams to query
      callback - The callback.
    • protectStreamUntil

      public void protectStreamUntil​(String playbackStreamId, int numDays, IServerCallback callback)
      Protects a playback stream from being purged (but not deleted) for the given number of days (from now). If the number of days given is less than the normal purge interval days (from createdAt), the longer protection date is applied. Can only be called by users involved in the playback stream. Service - Playback Stream Operation - PROTECT_STREAM_UNTIL
      Parameters:
      playbackStreamId - Identifies the stream to protect
      numDays - The number of days the stream is to be protected (from now)
      callback - The method to be invoked when the server response is received