Class HotspotPlot

java.lang.Object
android.view.View
com.castlabs.sdk.viisights.HotspotPlot
All Implemented Interfaces:
Drawable.Callback, AccessibilityEventSource, KeyEvent.Callback

public class HotspotPlot extends View
A custom view that displays hotspots or scenes as boxes on a timeline.
  • Constructor Details

    • HotspotPlot

      public HotspotPlot(Context context)
      Constructor for HotspotPlot.
      Parameters:
      context - The context in which the view is running.
    • HotspotPlot

      public HotspotPlot(Context context, AttributeSet attrs)
      Constructor for HotspotPlot with attributes.
      Parameters:
      context - The context in which the view is running.
      attrs - The attributes to apply to the view.
    • HotspotPlot

      public HotspotPlot(Context context, AttributeSet attrs, int defStyleAttr)
      Constructor for HotspotPlot with attributes and style.
      Parameters:
      context - The context in which the view is running.
      attrs - The attributes to apply to the view.
      defStyleAttr - The default style attribute to apply to the view.
  • Method Details

    • setHotspots

      public void setHotspots(Hotspot[] hotspots)
      Sets the hotspots to be displayed in the view.
      Parameters:
      hotspots - An array of Hotspot objects to be displayed.
    • update

      public void update(long playbackPositionMs, long durationUs)
      Updates the current playback position and duration of the media.
      Parameters:
      playbackPositionMs - The current playback position in milliseconds.
      durationUs - The total duration of the media in microseconds.
    • setScenes

      public void setScenes(Scene[] scenes, String categoryName)
      Sets the scenes to be displayed in the view along with the category name.
      Parameters:
      scenes - An array of Scene objects to be displayed.
      categoryName - The name of the category to filter scenes by.