Package com.castlabs.android.subtitles
Class ExoSubtitlesStyleObserver
java.lang.Object
com.castlabs.android.subtitles.ExoSubtitlesStyleObserver
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionExoSubtitlesStyleObserver(com.google.android.exoplayer2.ui.SubtitleView view) Creates a new ExoSubtitlesStyleObserver. -
Method Summary
Modifier and TypeMethodDescriptionvoidonStyleChange(com.castlabs.subtitles.presentation.SubtitlesStyle style) Called when a new style needs to be applied.
-
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:SubtitlesStyleObserverCalled when a new style needs to be applied. If null is passed here, the default style should be applied.- Specified by:
onStyleChangein interfaceSubtitlesStyleObserver- Parameters:
style- The style or null to use the default style
-