Class ExoSubtitlesStyleObserver

java.lang.Object
com.castlabs.android.subtitles.ExoSubtitlesStyleObserver
All Implemented Interfaces:
SubtitlesStyleObserver

public class ExoSubtitlesStyleObserver extends Object implements SubtitlesStyleObserver
Implementation of the SubtitlesStyleObserver that is used to pass the current subtitle style to the underlying ExoPlayer track renderer view.

This is an internal class and you usually do not need to interact with the class manually.

Since:
3.1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExoSubtitlesStyleObserver(com.google.android.exoplayer2.ui.SubtitleView view)
    Creates a new ExoSubtitlesStyleObserver.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onStyleChange(com.castlabs.subtitles.presentation.SubtitlesStyle style)
    Called when a new style needs to be applied.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExoSubtitlesStyleObserver

      public ExoSubtitlesStyleObserver(@NonNull com.google.android.exoplayer2.ui.SubtitleView view)
      Creates a new ExoSubtitlesStyleObserver.
      Parameters:
      view - The subtitle view to observe and update
  • Method Details

    • onStyleChange

      public void onStyleChange(@Nullable com.castlabs.subtitles.presentation.SubtitlesStyle style)
      Description copied from interface: SubtitlesStyleObserver
      Called when a new style needs to be applied. If null is passed here, the default style should be applied.
      Specified by:
      onStyleChange in interface SubtitlesStyleObserver
      Parameters:
      style - The style or null to use the default style